You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I have simply "single post page" that can be navigated through links (post?slug=x), and in getInitialProps Im dispatching action to get data for the singlePost, thing is that after clicking a link I have this scenario (in page single post page component):
shouldComponentUpdate -> componentDidUpdate -> componentDidUpdate (extra)
I would like to dispatch some additional actions after component will be loaded with the new post but its dispatching twice because of this.. or I just have a bug, but I spend some time on it already and it will be good to know if this is not a normal behaviour.
I'm using a layout for all my pages in my app, the layout is always the same but componentDidMount and componentWillUnmount are always called when switching pages. I expected them to run only once :c
So I have simply "single post page" that can be navigated through links (post?slug=x), and in getInitialProps Im dispatching action to get data for the singlePost, thing is that after clicking a link I have this scenario (in page single post page component):
shouldComponentUpdate -> componentDidUpdate -> componentDidUpdate (extra)
I would like to dispatch some additional actions after component will be loaded with the new post but its dispatching twice because of this.. or I just have a bug, but I spend some time on it already and it will be good to know if this is not a normal behaviour.
Menu with links: https://github.com/lzgrzebski/teachmesilence.com/blob/master/src/components/Menu/index.js
SinglePostContainer: https://github.com/lzgrzebski/teachmesilence.com/blob/master/src/containers/SinglePostContainer.js
post page: https://github.com/lzgrzebski/teachmesilence.com/blob/master/src/pages/post.js
The text was updated successfully, but these errors were encountered: