You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here, the div will have one children, an empty text node.
Expected Current Behaviour
Inferno should not create anything. null, as from my understanding, means to put nothing in the DOM at all. Replacing the functional component with directly {null} in the JSX actually does that (no text node at all).
It's important because an empty text node can actually display some empty spacing if line-height is defined in the CSS on some browsers. I would not expect a component returning null to have any impact.
Issue Template
Observed Behaviour
Inferno is creating an empty text node when a functional component returns
null
.Here, the
div
will have one children, an empty text node.Expected Current Behaviour
Inferno should not create anything.
null
, as from my understanding, means to put nothing in the DOM at all. Replacing the functional component with directly{null}
in the JSX actually does that (no text node at all).It's important because an empty text node can actually display some empty spacing if
line-height
is defined in the CSS on some browsers. I would not expect a component returningnull
to have any impact.Reproducing:
https://codesandbox.io/s/vigorous-browser-sw31e
Here is React rendering the same JSX code without any text node in both case:
https://codesandbox.io/s/admiring-water-o3exp
Inferno Metadata
macOS Chrome.
The text was updated successfully, but these errors were encountered: