Closed yandeu closed 2 years ago
It would be awesome if the documentation is ready soon. I tried setting it up but I don't know how to work with the uncompiled source code and couldn't get it running.
I wrote a real world example for you here.
The docs will follow soon.
<Switch />
will only trigger a re-render if the <Route />
component changes.<Route />
has a dynamic path like <Route exact path="/blog/:id">
and the user navigates from /blog/584
to /blog/219
, <Switch />
will NOT trigger a re-render and the user will never see /blog/219
. <Blog />
to listen for route changes. This will allow you to fetch the new blog post (based on the new id in "/blog/:id") and update the component.Btw, thanks a lot for your huge donation :heart_eyes:
No problem man. Awesome this is exactly what I'm looking for since days. I'll test it later today.
There is now a video available about the Router Listener: https://youtu.be/eUBuFORqPdo
Add documentation for router listener.
See: