repo_description: Test React Components with Jest and React Testing Library on TestingJavaScript.com
repo_topics: kcd-edu react react-testing-library testing testingjavascript
code: import * as React from 'react'
  import {CSSTransition} from 'react-transition-group'
  
  function Fade(props) {
    return (
      <CSSTransition unmountOnExit timeout={1000} classNames="fade" {...props} />
    )
  }
  
  function HiddenMessage({children}) {
    const [show, setShow] = React.useState(false)
    const toggle = () => setShow((s) => !s)
    return (
      <div>
        <button onClick={toggle}>Toggle</button>
        <Fade in={show}>
          <div>{children}</div>
        </Fade>
      </div>
    )
  }
  
  export {HiddenMessage}
  