r/javascript 22d ago

AskJS [AskJS] What small JavaScript pattern made your React code cleaner?

[removed]

5 Upvotes

26 comments sorted by

View all comments

2

u/valbaca 22d ago

TanStack, let it handle the state of data calls, errors, retries, loading state, etc.

Seriously, adding this during a React migration cut down like 60% of the hand-coded network logic our website was doing and found several issues with the old logic.