You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking to develop a filter component for some tables in my app and i'm reading the docs for react-router v6 and am having some trouble wrapping my head around when to send requests to my route's loader vs when to send requests to my route's action.
It seems like the loader might be the best place to send requests that filter data inside my route's component. but then when would i send a request to my route's action?
is it best to think about actions vs loaders as the analogy that loaders are for GET requests and actions are for mutations like POST / PUT?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone!
I'm looking to develop a filter component for some tables in my app and i'm reading the docs for react-router v6 and am having some trouble wrapping my head around when to send requests to my route's loader vs when to send requests to my route's action.
It seems like the loader might be the best place to send requests that filter data inside my route's component. but then when would i send a request to my route's action?
is it best to think about actions vs loaders as the analogy that loaders are for GET requests and actions are for mutations like POST / PUT?
Beta Was this translation helpful? Give feedback.
All reactions