I have the following code in my render function where I'm trying to pass the user as props to the <Client />
component. When I check to see which props <Client />
received its only history, location and match. this.props.test = undefined
const users = this.state.users;
return (
<TableBody>
{users.map((user, i) => {
return (
<TableRow key={i}>
<TableCell>
<Link to={`/Users/${user.name}`}>{user.name}</Link>
<Route
path={`/Users/${user.name}`}
render={props => <Client {...props} test="hi" />}
/>
</TableCell>
<TableCell>{user.jobTitle}</TableCell>
<TableCell>{user.company.name}</TableCell>
<TableCell>{user.status}</TableCell>
</TableRow>
);
})}
</TableBody>
)