title: Issue trying to re-render react parent component from child
body: <p>Trying to re-render parent component from child component callback . in the Payment button I call axios to update a state, then I need the parent to show this new updated state, so I try to set a "false" state to true, which I am hoping will trigger  a re-render.</p>
  
  <p>Error:  </p>
  
  <pre><code>Line 28:4:  Expected an assignment or function call and instead saw an expression
  
  </code></pre>
  
  <p>from parent </p>
  
  <pre><code>
      const [success, setSuccess] = useState(false);
  
  &lt;h4&gt;
                      Purchase 5 more post's : &lt;PaymentButton name="more post" price={5} description="create more post"
                          object={
                  { email: user.email, max_posts: user.max_posts + 5 }
                          }
                          success ={()=&gt;setSuccess(true)}
  
                      /&gt;
  
                  &lt;/h4&gt;
  </code></pre>
  
  <p>from child </p>
  
  <pre><code>const PaymentButton = ({ name, price, description,object }) =&gt; {
  
      const handleToken = async (token, addresses) =&gt; {
          const response = await axios.post('http://localhost:3000/api/payment/checkout', {
              token,
              product: { name, price, description }
          });
  
          const { status , resolved} = response.data;
  
          console.log('Response:', response);
          console.log('network_status :', resolved);
          console.log(JSON.stringify(object))
  
  
          if (status === 'succeeded' &amp;&amp; resolved ==='approved_by_network') {
              toast('Success! Purchase Approved. ', { type: 'success' });
              return axios.put('http://localhost:3000/api/users/getuser', { ...object });
              object.success
  
  
          } else {
              toast('Something went wrong, contact site admin about this', { type: 'error' });
          }
      };
  
  
  </code></pre>