title: how can I call my button value that is on another page?
body: <p>I'm new on Reactjs and i came across this issue, i made the function of an input on page number 1, where I type a numeric value, I call this function on the second page where I call the function and where I also define the paypal parameters:</p>
  <p>Function input of the first page:</p>
  <pre><code>function ButtonBID() {
    return (
      &lt;&gt;
        &lt;div class=&quot;form__group field&quot;&gt;
          &lt;input
            type=&quot;input&quot;
            class=&quot;form__field&quot;
            placeholder=&quot;Name&quot;
            name=&quot;bid&quot;
            id=&quot;name&quot;
            required
          /&gt;
          &lt;label for=&quot;name&quot; class=&quot;form__label&quot;&gt;
            Bid now!
          &lt;/label&gt;
        &lt;/div&gt;
      &lt;/&gt;
    );
  }
  </code></pre>
  <p>Then i call this function on the second page:</p>
  <pre><code>import React, { useRef, useEffect } from 'react'
  import { Link } from 'react-router-dom'
  import Navbar from '../../Components/Navbar/Navbar'
  import Video from '../../Asssets/Video/Video.mp4'
  import Table from '../../Components/Table/Table'
  import styled from 'styled-components'
  import { FirstPositionButton, ButtonBID } from '../../Components/Buttons/Button/Button'
  
  function RankingHome() {
  
    const paypal = useRef()
  
    useEffect(() =&gt; {
      window.paypal.Buttons({
        createOrder: (data, actions, err) =&gt; {
          return actions.order.create({
            intent: &quot;CAPTURE&quot;,
            purchase_units: [{
              description: 'Cool looking table',
              amount: {
                currency_code: &quot;EUR&quot;,
                value: //**** i would to call the input value here ***//
                      }
            }]
          })
        },
        onApprove: async (data, actions) =&gt; {
          const order = await actions.order.capture()
          console.log(order)
        },
        onError: (err) =&gt; {
          console.log(err)
        }
      }).render(paypal.current)
    }, [])
    return (
      &lt;&gt;
        &lt;Navbar /&gt;
        &lt;HeroContainer&gt;
          &lt;HeroBg&gt;
            &lt;VideoBg src={Video} type=&quot;video/mp4&quot; autoPlay loop muted playsInline /&gt;
          &lt;/HeroBg&gt;
          &lt;HeroContent&gt;
            &lt;HeroItems&gt;
              &lt;HeroH1&gt;Who will win?&lt;/HeroH1&gt;
              &lt;Table /&gt;
              &lt;div className=&quot;flexati&quot;&gt;
                &lt;FirstPositionButton /&gt;
                &lt;ButtonBID /&gt;
                &lt;Link to='/Pay'&gt;
                  &lt;i class=&quot;far fa-check onClick={paypal}&quot;&gt;&lt;/i&gt;
                  &lt;div ref={paypal}&gt;&lt;/div&gt;
                &lt;/Link&gt;
              &lt;/div&gt;
            &lt;/HeroItems&gt;
          &lt;/HeroContent&gt;
        &lt;/HeroContainer&gt;
      &lt;/&gt;
    )
  }
  
  export default RankingHome
  </code></pre>
  <p>I would like to be able to take the value of the 'textbox' and finally pass it as a parameter inside the paypal 'amount', thanks!!</p>