React functional vs class component
Javascript
// functional component
const Spinner = props => {
  let { className, hidden } = props
  className = 'spinner ' + className
  if (hidden === true) className += " hidden " // return ''
  return <div className={className}><span className='inner' /></div>
}

// using class syntax for component
class Spinner extends React.Component {
  constructor(props) {
    super(props)
  }

  render() {
    let className = 'spinner ' + this.props.className
    if (this.props.hidden === true) className += " hidden " // return ''

    return (
      <div className={className}>
        <span className='inner' />
      </div>
    )
  }
}