1new URLSearchParams(location.search).get("your_query_param_key")
2______________________________________
3
4 if(location && location?.search?.includes("registration_token")){
5 const emailValue = new URLSearchParams(location.search).get("email")
6 const regTokenValue = new URLSearchParams(location.search).get("registration_token")
7
8 setValue("email", emailValue)
9 setValue("registration_token", regTokenValue)
10 console.log(regTokenValue, emailValue);
11 }
1 const query = new URLSearchParams(this.props.location.search);
2
3const token = query.get('token')
4console.log(token)//123
1const Child = ({ match }) => (
2 <div>
3 <h3>ID: {match.params.id}</h3>
4 </div>
5)