#use a State value on loader.
1 messages · Page 1 of 1 (latest)
because the loader runs outside React there's no way to access a state value directly, for a loader, the way to pass data is using the URL, you can use either route params (the $something) or search params (those after ?)
so what you should do is when you fetch that loader on a URL let's say /dishes you can do /dishes?categories=frutas