#shouldRevalidate is not working

1 messages · Page 1 of 1 (latest)

short vortex
#

Hello, whenever I am entering a nested route with dynamic params, the root loader keeps on being triggered, regardless of whether the nested route has a loader of its own, and the index.tsx route under the same folder route has a loader aswell.

I've read that shouldRevalidate should allow me to control Remix's optimization attempts and stop it from trying to load the root loader under certain conditions, depending on what is being placed within shouldRevalidate.

I've attempted multipile times to test it out, including throwing a return false under all conditions, yet, it seems that nothing happens regardless of what is written in it.

The shouldRevalidate is being exported out of the specific route similarly to the dedicated loader and action functions.

Am I missing something? Is shouldRevalidate even working? Are there other ways to stop the root loader from triggering on frontend route redirects?
Thanks in advance!

potent grotto
#

Are you using Link or <a>?