Skip to content

What's the recommended command, library or tool for making API calls within react-router? #13714

Answered by GabenGar
binarykitchen asked this question in Q&A
Discussion options

You must be logged in to vote

Loaders can return redirect/replace responses. In your specific case you can just handle your auth stuff in a client loader and straight up throw actual errors and filter for them in the nearest error boundary, no need to bother with statuses and deserialization of server errors.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@GabenGar
Comment options

@binarykitchen
Comment options

@GabenGar
Comment options

Answer selected by binarykitchen
@binarykitchen
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants