@iresine/react-query-wrapper

1.0.3 • Public • Published

@iresine/react-query-wrapper

@iresine/react-query-wrapper is the layer between @iresine/core and react-query.

Install

npm i @iresine/react-query-wrapper

How use @iresine/react-query-wrapper?

@iresine/react-query-wrapper constructor waits instance of @iresine/core and instance react-query and then if the data has special fields for normalization, magic happens

Example

import IresineStore from 'packages/core/src/index';
import IresineReactQueryWrapper from '@iresone/react-query-wrapper';
import {QueryClient} from 'react-query';

const iresineStore = new IresineStore();
const queryClient = new QueryClient();
new IresineReactQueryWrapper(iresineStore, queryClient);
// now any updates in react-query will be consumbe by @iresine/core

if you now how mobx work, @iresine/core is like mobx and @iresone/react-query-wrapper like react-mobx

Readme

Keywords

none

Package Sidebar

Install

npm i @iresine/react-query-wrapper

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

12.2 kB

Total Files

5

Last publish

Collaborators

  • iresine