lulus data navigasi reaksi router 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} />}