Currently in my code I need to pass a value from one component to the other through a button using router link .. I am able to do this, but this value is appearing in the URL, appearing as if I had sent a GET. I want to be able to pass this value on to the other component in a hidden way.
See the important parts of my code:
In TotalCartComponent:
<Link to={"/orderproduct/" + total}>ADVANCE</Link>
In OrderProduct:
<h1>HELLO!!</h1>
<h4>Total is: {this.props.match.params.total}</h4>
In AppShell:
<main>
<Switch>
<Route exact path="/" component={Main}/>
<Route path="/mycart" component={MyCart}/>
<Route path="/orderproduct/:total" component={OrderProduct}/>
<Route path="/view1" component={View1}/>
</Switch>
</main>