title: Passing State as Prop
body: <p>I want to a button show in some child components and don't show in other components. I used useState in parent component but couldn't pass it to child components. How can I do that?</p>
  <pre><code>  const [showRepo, setShowRepo] = useState(false);
  const handleShowRepo = () =&gt; {
  setShowRepo = !showRepo;
  </code></pre>
  <p>};</p>
  <p>Where I use it;</p>
  <pre><code>&lt;button className={!showRepo ? `${styles.viewRepo} ${styles.hideRepo}` : `${styles.viewRepo}`}&gt;
            &lt;a target=&quot;_blank&quot; href={`${props.link}`}&gt;
              {props.buttonText}
            &lt;/a&gt;
          &lt;/button&gt; 
  </code></pre>