terrierscript
10/20/2015 - 2:34 PM

Stateless functional componentsでnull返してはまった話 ref: http://qiita.com/inuscript/items/05469cc3787de4e6a49a

Stateless functional componentsでnull返してはまった話 ref: http://qiita.com/inuscript/items/05469cc3787de4e6a49a

const FooItem = ({ show }) => {
  if(!show){
    return <noscript />
  }
  return (
    <div>some component</div>
  )
}
const FooItem = ({ show }) => {
  if(!show){
    return <noscript />
  }
  return (
    <div>some component</div>
  )
}
const FooItem = ({ show }) => {
  if(!show){
    return null
  }
  return (
    <div>some component</div>
  )
}
const FooItem = ({ show }) => {
  if(!show){
    return null
  }
  return (
    <div>some component</div>
  )
}