-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: atomWithQuery. make suspense consistent with tanstack. use refetch from tanstack * arbitrary change * final atomWithQuery * address pnpm issues * actually address pnpm issues * address microbundle errors * arbitrary change * use v5, add atomWithMutation, atomWithSuspense with existing tests * add atomWithInfiniteQuery with existing tests adjusted to v5 api * add atomWithSuspenseInfiniteQuery * refactor to baseAtom pattern * add examples * add atomWithMutationState * use node v20 for codesandbox ci * use node v18 because v20 isn't supported yet by codesandbox * add suspense test, on reset throws suspense * can recover from error for non-suspense queries * mark debugPrivate true * remove atomWithObservable, stale observer ref * update examples * remove QueryAtomErrorResetBoundary.tsx * cleanup, update package.json
- Loading branch information
Showing
49 changed files
with
2,362 additions
and
1,886 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"buildCommand": "compile", | ||
"sandboxes": ["new", "react-typescript-react-ts"], | ||
"node": "14" | ||
"node": "18" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
/dist | ||
/src/vendor | ||
/src/vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,21 @@ | ||
import { | ||
atomsWithInfiniteQuery, | ||
atomsWithMutation, | ||
atomsWithQuery, | ||
atomsWithQueryAsync, | ||
atomWithInfiniteQuery, | ||
atomWithMutation, | ||
atomWithMutationState, | ||
atomWithQuery, | ||
atomWithSuspenseInfiniteQuery, | ||
atomWithSuspenseQuery, | ||
queryClientAtom, | ||
} from '../src/index' | ||
|
||
describe('basic spec', () => { | ||
it('should export functions', () => { | ||
expect(queryClientAtom).toBeDefined() | ||
expect(atomsWithQuery).toBeDefined() | ||
expect(atomsWithInfiniteQuery).toBeDefined() | ||
expect(atomsWithMutation).toBeDefined() | ||
expect(atomsWithQueryAsync).toBeDefined() | ||
expect(atomWithQuery).toBeDefined() | ||
expect(atomWithInfiniteQuery).toBeDefined() | ||
expect(atomWithMutation).toBeDefined() | ||
expect(atomWithSuspenseQuery).toBeDefined() | ||
expect(atomWithSuspenseInfiniteQuery).toBeDefined() | ||
expect(atomWithMutationState).toBeDefined() | ||
}) | ||
}) |
Oops, something went wrong.