i have a button which contain id attribute and that button is a link to another react component but i want to carry on with the id to the next component. code:
<Link><button id={user._id>next</button></Link> any help
Simpliest way would be to carry the id via url attribute.
<Link to={'routetonext?id='+user._id}><button>next</button></Link>
so unless you neet the ID on the button for other purposes you can simply lift the user id one level up in the Link Tag
Stay foolish
Devy
Developer
You can pass states to Link router like:
<Link to={path: '/', state:{user_id: user.id}}><button>next</button></Link>