SIGN IN SIGN UP
TanStack / query UNCLAIMED

🤖 Powerful asynchronous state management, server-state utilities and data fetching for the web. TS/JS, React Query, Solid Query, Svelte Query and Vue Query.

0 0 116 TypeScript

fix(queryObserver): make sure that memoized select function only runs once per input (#3098)

we compute the result optimistically, and then one more time when calling setOptions. Both times run the select function because only setOptions will update the previous result and previous options. storing the "previous" selectFn separately on the observer whenever it was invoked (independent of the fact from where it was called) side-steps the issue
D
Dominik Dorfmeister committed
2054f5b227d1e6bb4d4efea8e33ec6e0534cb933
Parent: f9077bc
Committed by GitHub <noreply@github.com> on 12/15/2021, 6:52:32 PM