I'm trying to get React to render an empty attribute, but instead it's not including it at all. Any ideas?
render(){
return <myComponent foo="{ this.state.foo }" />
}
when this.state.foo if falsey, this yields:
<mycomponent />
whereas I want:
<myComponent foo />
Aucun commentaire:
Enregistrer un commentaire