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
What's the practical use-case of this? When would you just want to output any value that React can render and ignore any it cannot? I have done a lot of React work and I cannot say I ever encountered this use-case, some I'm very curious.
https://reactjs.org/docs/jsx-in-depth.html#booleans-null-and-undefined-are-ignored
Only certain types in React can be rendered.
false
,null
,undefined
, andtrue
are valid React children. They don’t render.Here, I propose a new API and its use case:
Since
renderInReact
might requires@types/react
,notRenderInReact
may be better. It's equal to the combination ofnullOrUndefined
andboolean
.The name may be changed to something simpler, like
is.render
The text was updated successfully, but these errors were encountered: