Read data in props.histroy.push in react component code example
Example: Read data in props.histroy.push in react component
import React from 'react';
const YourRoute = props=> {
const { _id, name } = (props.location && props.location.state) || {};
//_id and name will contain the passed data
.
.
.
}