Closed tfsjohan closed 5 years ago
Hey @tfsjohan
There's a mistake in the docs for frontloadConnect
- the onUpdate
option is actually default false, not default true. Sorry about that - I'll correct it.
If you set onUpdate true, it should run - can you try that and let me know if it works?
Thanks! That solved the problem. I just had to be more careful when writing new state to not could a infinite loop of updates. :)
Great!
I use React Router and have a page with links like /view/1, /view/2. These use the same Frontload-enhanced component. But my frontload function is not run when navigating between pages that use the same component. It does work when navigating to a page that use a different component.
I can see that the component runs componentDidUpdate and props.location.pathname is updated so I don't understand why the frontload function is not run again.
Any ideas what I should do?