how to pass data in router link react typescript

Solutions on MaxInterview for how to pass data in router link react typescript by the best coders in the world

showing results for - "how to pass data in router link react typescript"
Elyes
14 May 2019
1<Route
2  path='/project/:id'
3  render={({ location }) => {
4    const { state } = location;
5    return <ProjectDetails project={state.project} /> 
6  }}
7/>
8
Máximo
03 Jan 2019
1<Link
2  to={{
3    pathname: path,
4    state: {
5      project,
6    },
7  }}
8  key={project.id}
9>
10  <ProjectSummary project={project} deleteCallback={projectDelete}/>
11</Link>
12