LearnNewsExamplesServices
Frontmatter
id7059
titleAdd support for "empty" vdom child nodes
stateClosed
labels
enhancement
assigneestobiu
createdAtJul 15, 2025, 7:10 PM
updatedAtJul 15, 2025, 7:11 PM
githubUrlhttps://github.com/neomjs/neo/issues/7059
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJul 15, 2025, 7:11 PM

Add support for "empty" vdom child nodes

Closed v10.0.0-beta.6 enhancement
tobiu
tobiu commented on Jul 15, 2025, 7:10 PM

While this coding style works, I doubt that many devs will think about not polluting vdom with empty values.

            }, isComposing ? {
                module : ComposeView,
                id     : 'compose-view',
                onClose: onCloseCompose
            } : null].filter(Boolean)

So, we should enable the following syntax:

            }, isComposing && {
                module : ComposeView,
                id     : 'compose-view',
                onClose: onCloseCompose
            }]

null or false values.

vdom.Helper needs a boolean filter to prevent these items to get into vnode trees.

manager.Component#getVdomTree() must no longer transform these values into empty objects.

tobiu assigned to @tobiu on Jul 15, 2025, 7:10 PM
tobiu added the enhancement label on Jul 15, 2025, 7:10 PM
tobiu referenced in commit b0dbcf0 - "Add support for "empty" vdom child nodes #7059" on Jul 15, 2025, 7:11 PM
tobiu closed this issue on Jul 15, 2025, 7:11 PM