Is possible to do something like this:
<Route exact path="/activate/:token" render={this.activateAccount} />
then in same component
activateAccount(token) {
console.log(token);
return null;
}
How to pass token?
Is my logic correct? Learning MERN a bit, what I find confusing right now is how to move between backend and frontend, for example here when I generate activate account URL I have something like
http://localhost:5006/api/activate/8d7f5b25befb70045b5cb36893fa0f7688b85504
Now my NodeJS/Express is running on 5006 port and my ReactJS is on 3006, not sure what is logic here, I can finish everything on my NodeJS side in this case but not sure how to redirect later on to /login/ on frontend.
Thanks!