|
1 | | -# core |
| 1 | +# `@tanstack-query-with-orbitjs/core` |
2 | 2 |
|
3 | | -This library was generated with [Nx](https://nx.dev). |
| 3 | +A library for using [TanStack Query](https://tanstack.com/query) with [Orbit.js](https://orbitjs.com/). |
4 | 4 |
|
5 | | -## Building |
| 5 | +This is the UI framework agnostic _core_, which could be seen as corresponding to [`@tanstack/query-core`](https://github.com/TanStack/query/tree/v4.16.1/packages/query-core) in original TanStack Query. |
6 | 6 |
|
7 | | -Run `nx build core` to build the library. |
| 7 | +## Usage |
8 | 8 |
|
9 | | -## Running unit tests |
| 9 | +Install using your preferred Node.js package manager. For example: |
10 | 10 |
|
11 | | -Run `nx test core` to execute the unit tests via [Jest](https://jestjs.io). |
| 11 | +```sh |
| 12 | +pnpm add @tanstack-query-with-orbitjs/core |
| 13 | +``` |
| 14 | + |
| 15 | +`@tanstack-query-with-orbitjs/core` comes with three new classes that enable the integration between TanStack Query and Orbit.js: |
| 16 | + |
| 17 | +- **`LiveQueryClient`**<br/> |
| 18 | + Replacement for |
| 19 | + [`QueryClient`](https://tanstack.com/query/v4/docs/reference/QueryClient). |
| 20 | + (Extends |
| 21 | + [`QueryClient`](https://tanstack.com/query/v4/docs/reference/QueryClient) |
| 22 | + class.) |
| 23 | + |
| 24 | +- **`LiveQueryObserver`**<br/> |
| 25 | + Replacement for |
| 26 | + [`QueryObserver`](https://tanstack.com/query/v4/docs/reference/QueryObserver). |
| 27 | + (Extends |
| 28 | + [`QueryObserver`](https://tanstack.com/query/v4/docs/reference/QueryObserver) |
| 29 | + class.) |
| 30 | + |
| 31 | +- **`LiveInfiniteQueryObserver`**<br/> |
| 32 | + Replacement for |
| 33 | + [`InfiniteQueryObserver`](https://tanstack.com/query/v4/docs/reference/InfiniteQueryObserver). |
| 34 | + (Extends |
| 35 | + [`InfiniteQueryObserver`](https://tanstack.com/query/v4/docs/reference/InfiniteQueryObserver) |
| 36 | + class.) |
| 37 | + |
| 38 | +It also exports the following types: |
| 39 | + |
| 40 | +- **`LiveQueryClientConfig`**<br/> |
| 41 | + Interface describing the config passed to the `LiveQueryClient` constructor. (Extends |
| 42 | + [`QueryClientConfig`](https://github.com/TanStack/query/blob/v4.16.1/packages/query-core/src/types.ts#L708-L713) |
| 43 | + interface.) |
| 44 | + |
| 45 | +- **`QueryMeta`**<br/> |
| 46 | + Module augmented, and declaration merged more specific version of |
| 47 | + the |
| 48 | + [`QueryMeta`](https://github.com/TanStack/query/blob/v4.16.1/packages/query-core/src/types.ts#L51-L53) |
| 49 | + interface. |
| 50 | + |
| 51 | +- **`GetQueryOrExpressions`**<br/> |
| 52 | + Type which describes the first parameter of the [`MemorySource#query`](https://orbitjs.com/docs/api/memory/classes/MemorySource#query) method. |
0 commit comments