Answers for "how to send data to another page in react from button"

0

how to send data to another page in react from button

<Link
  to={{
    pathname: "/page",
    data: data // your data array of objects
  }}
>
  
//in /page
  render() {
  const { data } = this.props.location
  return (
    // render logic here
  )
}
Posted by: Guest on May-01-2020

Code answers related to "how to send data to another page in react from button"

Code answers related to "Javascript"

Browse Popular Code Answers by Language