developit / developit/vhtml

render nothing if the param is the number zero

Open
#37 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
814
Forks
37
PR merge metrics
No merged PRs in 30d

Description

In react, the number zero will be rendered directly, rather than taken as false or null.

`let items = ['one', 'two', 'three'];
document.body.innerHTML = (


Hi!


Here is a list of {items.length} items:



    { items.map( item => (
  • { 1 }

  • )) }


);
`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.