Open
Description
I'm currently investigating issue related to notification not being displayed after route change. Following scenario describes the case:
- I have separate route which presents form for adding new entity
- When I click "Save" button AJAX request is dispatched and on success of that request I dispatch new notification and immediately change route using
history.push('/some-url')
Following pseudo-code presents that:
function onSuccess(data){
dispatch(Notifications.success( .... ));
history.push('/some-url');
}
- After route is changed notification is not displayed however notification is still inside Redux store. Also no RNS_HIDE_NOTIFICATION is fired.
- When I invoke an action which displays another notification but does not change the route "old" notifications are displayed too what looks like queuing up of notifications.. All notifications disappear after expected time.
Here's list of dependencies:
"axios": "^0.16.2",
"common-tags": "^1.4.0",
"immutability-helper": "^2.3.0",
"jwt-decode": "^2.2.0",
"prop-types": "^15.5.10",
"query-string": "^5.0.0",
"react": "^15.5.4",
"react-autosize-textarea": "^0.4.8",
"react-bootstrap": "^0.31.0",
"react-bootstrap-typeahead": "^2.0.0-alpha.1",
"react-collapsible": "^1.5.0",
"react-cookies": "0.0.1",
"react-dom": "^15.5.4",
"react-html-id": "^0.1.1",
"react-notification-system": "^0.2.14",
"react-notification-system-redux": "^1.1.4",
"react-numeric-input": "^2.0.7",
"react-redux": "^5.0.5",
"react-router-bootstrap": "^0.24.2",
"react-router-dom": "^4.1.1",
"redux": "^3.6.0",
"redux-form": "^6.7.0",
"redux-thunk": "^2.2.0"
I'm relatively new to React and Redux and I'm trying to build minimal app which reproduces that issue but maybe you could figure out faster what's going on.