how can i get state variables from one component to another when using historypush?

In login page, you can pass params to dashboard page in this way.

  pathname: '/dashboard',
  state: { 
    'username': this.state.username, 
    'password': this.state.password 

You can access params on dashboard page like this:



CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top