I just realized that I can pass empty strings as children in react.
function App() {
return (
<Comp> {} {} </Comp>
);
}
Here is the result directly copy pasted from React Developer Tools.
{
"children": [
" ",
" ",
" "
]
}
I found a Github issue describing this. The issue is closed because that is an expected behavior.
My question is, what is the use case for something like that? Why is this an intended behavior?