Open ardok opened 5 years ago
I tried setting up connected-react-router
from fresh app using create-react-app
, and it's properly firing @@router/LOCATION_CHANGE only once.
{
type: '@@router/LOCATION_CHANGE',
payload: {
location: {
pathname: '/fy18/Phase-4/TASK-40234',
search: '',
hash: ''
},
action: 'POP',
isFirstRendering: false
}
}
So, this must be something to do with Fusion, or the way I set it up. Could you think of any reason that could cause the action getting fired 4x on page load?
This plugin isn't super well supported right now. It was built as a proof of concept. I recommend keeping routing logic separate from the redux store and using the withRouter
hoc to get access to routing related props.
Event
@@router/LOCATION_CHANGE
gets fired off 4x on page load. Looked around online and it seems like there's nothing mentioning this issue.Type of issue
Bug?
Description
@@router/LOCATION_CHANGE
action should get fired once on page load.Current behavior
@@router/LOCATION_CHANGE
action gets fired 4x on page load.They all have the same exact payload.
Expected behavior
There should only be one
@@router/LOCATION_CHANGE
Steps to reproduce
Your environment
fusion-plugin-connected-react-router version: 1.1.1
Node.js version (
node --version
): 8.11.3npm version (
npm --version
): 5.6.0Operating System: macOS Mojave 10.14.3