New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
isFirstRendering always false #259
Comments
What the bug does it cause? Basically, it's intended to be false except only for the first time here. |
We use SSR in our apps. We cannot determine the first LOCATION_CHANGE on client. This needed to prevent get data on client because they received on server. |
I don't use SSR but it is always false for me too. I've integrated connected-react-router with create-react-app. |
@AlexeyAbretov I re-read the code again and you're right. It's obviously a bug. The 3rd argument is passed from |
in actions.js the method onLocationChanged has the parameter isFirstRendering but the method onLocationChanged from ConnectedRouter.js does not send a value.
actions.js
export const onLocationChanged = (location, action, isFirstRendering = false) => ({
type: LOCATION_CHANGE,
payload: {
location,
action,
isFirstRendering,
}
})
ConnectedRouter.js
const mapDispatchToProps = dispatch => ({
onLocationChanged: (location, action) => dispatch(onLocationChanged(location, action))
})
The text was updated successfully, but these errors were encountered: