This library provides some hooks and a HOC to use inside an abledev isolated
component. useQuery
and useMutation
are wrappers around
react-query that offers the following
experience:
import loadData from "./queries/loadData";
const { data } = useQuery(loadData);
which it's not possible with regular useQuery
.
This also provides a HOC called wrapRootComponent
that marks a component as
the root of the isolated component. This serves 2 purposes:
- Streamline the inclusion of React Query's
QueryClientProvider
, which would require the user to create 2 components with some specific behavior. - Provide a central way to configure react-related behavior such as
suspense
.
- Clone this repository and
cd
into it. - Install the dependencies:
yarn
. - Play with the tests:
yarn test --watch
. - To deploy:
- Change the version in the
package.json
'sversion
field. As we're in a very alpha state, just increase the number next to alpha there. - Commit the
package.json
change. - Go to github and create a release. It will publish the package to
@ableco/abledev-react
.
- Change the version in the