passer des données naviguez sur le routeur DOM
const navigate = useNavigate();
navigate('/other-page', { state: { id: 7, color: 'green' } });
Technical Heaven
const navigate = useNavigate();
navigate('/other-page', { state: { id: 7, color: 'green' } });
<Route path="/" component={() => <Search name={this.props.name} />} />
render={routeProps => <Search name={this.props.name} {...routeProps} />}