TanStack / query

🤖 Powerful asynchronous state management, server-state utilities and data fetching for the web. TS/JS, React Query, Solid Query, Svelte Query and Vue Query.
https://tanstack.com/query
MIT License
42.76k stars 2.92k forks source link

refactor(react-query): apply early return/continue #8100

Closed kickbelldev closed 2 months ago

kickbelldev commented 2 months ago

I've made improvements to the react-query package by applying the early return/continue pattern to reduce nested if statements and if-else constructs.

TkDodo commented 2 months ago

it’s subjective, but I don’t think negated conditions and continue statements make the code any more readable.