I'm trying to transition an app to use redial but I have the need to prevent possible refetches based on conditions involving comparison of the previous and next params. My current custom implementation uses component hooks and works much like a resolver (with multi-pass rendering on the server).
Given a route /something/:id/:segment I want to prevent data fetching if :segment changes and allow it if :id changes. @markdalgleish Do you have any pointers how to make this work? I feel that I have to use something like redux-react-router to gain access to the previous params in the match which gets executed in history.listen. Would love to hear your thoughts on this and maybe a different approach if you happen to have one.
I'm trying to transition an app to use
redial
but I have the need to prevent possible refetches based on conditions involving comparison of the previous and next params. My current custom implementation uses component hooks and works much like a resolver (with multi-pass rendering on the server).Given a route
/something/:id/:segment
I want to prevent data fetching if:segment
changes and allow it if:id
changes. @markdalgleish Do you have any pointers how to make this work? I feel that I have to use something likeredux-react-router
to gain access to the previous params in thematch
which gets executed inhistory.listen
. Would love to hear your thoughts on this and maybe a different approach if you happen to have one.