react router history get state code example
Example 1: how to get state value from history react
history.push({
pathname: '/path',
customNameData: yourData,
});
Example 2: how to get state value from history react
history.push('/path', yourData);