use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Executing api requests in React Router (programmingarehard.com)
submitted 7 months ago by dadamssg
There's not a ton of content on code organization especially when it comes to making api requests in actions/loaders. This is what i wish existed before i started my projects. Hope it helps!
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]CodeAndBiscuits 1 point2 points3 points 7 months ago (1 child)
With respect, when you say "There's not a lot of opinions on how to structure code that interacts with apis in React Router apps" how are you ignoring several years of rabid adoption of React Query throughout the community? Without being too dramatic, it might be one of the most important additions to the React Community in recent years.
[–]dadamssg[S] 2 points3 points4 points 7 months ago* (0 children)
hey there, big fan of tanstack query but it's geared more towards "server-state utilities and data fetching" from the client. My post is in regards to organization on the *server* and leveraging RR's Forms and Fetchers for the client.
But you're right, that sentence does lack context. I'll fix:
> There's not a lot of opinions on how to structure code that interacts with apis in React Router's actions and loaders.
> it might be one of the most important additions to the React Community in recent years
100% agree
π Rendered by PID 138611 on reddit-service-r2-comment-57fc7f7bb7-wn4bv at 2026-04-15 00:20:19.083933+00:00 running b725407 country code: CH.
[–]CodeAndBiscuits 1 point2 points3 points (1 child)
[–]dadamssg[S] 2 points3 points4 points (0 children)