Answer the question
In order to leave comments, you need to log in
How to catch a Request for a page in React + redux?
There is a social login page. After authorization, the server will redirect to the /admin page. How to get the value from request on the /admin page?
There should be information about the user inside.
Answer the question
In order to leave comments, you need to log in
when authorizing, write data to redux, redux is the only source of truth do not deviate from this rule
example
may not be the best example but it works stably, when I authorize through social networks, a token arrives in the url
<Route exact path="/"
render={() => {
let token = getParameterByName('accessToken',history.location.search)
if(token!=undefined&& token!=null){
this.props.getProfileInfo(token)
}
return (<Redirect to={`/list/${id}`}/>)
}}
/>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question