How get location from props?
function TobaccoLine({ match, props }) {
const activeTab = useSelector(state => props.location.state ? props.location.state.activeTab : 0);
...
}
Props are undefined.
ReactJS v16.13.1
You can use the location instead of props.
function TobaccoLine({ match, location }) {
const activeTab = useSelector(state => location.state ? location.state.activeTab : 0);
...
}