how to send data between components in react with redirect
<Redirect
to={{
pathname: "/page",
state: data // your data array of objects
}}
>
how to send data between components in react with redirect
<Redirect
to={{
pathname: "/page",
state: data // your data array of objects
}}
>
react router redirect with query params
import { withRouter } from 'react-router-dom';
class SearchComponent {
// Component Code goes here
onSubmit(){
let queryString = "q=" + this.state.q;
this.props.history.push(`/search/hotels?${queryString}`);
}
}
export default withRouter(SearchComponent)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us