Skip to content

Instantly share code, notes, and snippets.

@terrierscript
Last active November 4, 2015 08:47
Show Gist options
  • Save terrierscript/8f075d5998f94ab14d9e to your computer and use it in GitHub Desktop.
Save terrierscript/8f075d5998f94ab14d9e to your computer and use it in GitHub Desktop.
Stateless functional componentsでnull返してはまった話 ref: http://qiita.com/inuscript/items/05469cc3787de4e6a49a
const FooItem = ({ show }) => {
if(!show){
return null
}
return (
<div>some component</div>
)
}
const FooItem = ({ show }) => {
if(!show){
return null
}
return (
<div>some component</div>
)
}
const FooItem = ({ show }) => {
if(!show){
return <noscript />
}
return (
<div>some component</div>
)
}
const FooItem = ({ show }) => {
if(!show){
return <noscript />
}
return (
<div>some component</div>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment