-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
render nothing if the param is the number zero #37
Comments
odinhb
added a commit
to dodoas/stringjsx
that referenced
this issue
Mar 8, 2024
fixes developit#40 and developit#37 inspired by developit#41 The only place we don't have parity right now is arrays (because that's how children are passed) and bigint (because I'm not gonna do dependency wrangling rn)
odinhb
added a commit
to dodoas/stringjsx
that referenced
this issue
Mar 8, 2024
fixes developit#40 and developit#37 inspired by developit#41 The only place we don't have parity right now is arrays (because that's how children are passed) and bigint (because I'm not gonna do dependency wrangling rn)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In react, the number zero will be rendered directly, rather than taken as false or null.
let items = ['one', 'two', 'three']; document.body.innerHTML = ( <div class="foo"> <h1>Hi!</h1> <p>Here is a list of {items.length} items:</p> <ul> { items.map( item => ( <li>{ 1 }</li> )) } </ul> </div> );
The text was updated successfully, but these errors were encountered: