title: How do you pass data from one view to the other via react-router-dom without using url parameters?
body: <p>I use react-router-dom v 4.3.1 for client-side routing. I'm pretty new to React and can't figure out how to pass data from one view to the other without using url parameters.  In Angular, the Angular router has a data property where you can pass data associated with a route. An example would be:</p>
  
  <p><code>const appRoutes: Routes = [
    {
      path: 'hero/:id',
      component: HeroDetailComponent,
      data: { title: 'Hero Detail' }
    },
  ];
  </code></p>
  
  <p>Can you do the same in react-router-dom? If not, how would you recommend I pass data in React?</p>
  
  <p>Thanks in advance for the help!</p>