@rescriptbr/react-query
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "@rescriptbr/react-query", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -11,4 +11,4 @@ <p align="center"> | ||
> :warning: This repo contains experimental bindings for [@tanstack/query](https://tanstack.com/query/v4) using the experimental optional fields API with ReScript@v10. | ||
If you're looking bindings to the React Query v3 click [here](https://github.com/rescriptbr/react-query/tree/v0.0.2). | ||
> :warning: This repo contains experimental bindings for [@tanstack/query](https://tanstack.com/query/v4) using the new optional fields API. | ||
If you're looking for bindings to the React Query v3 click [here](https://github.com/rescriptbr/react-query/tree/v0.0.2). | ||
@@ -20,3 +20,3 @@ ## Installation | ||
```sh | ||
yarn add @rescriptbr/react-query react-query | ||
yarn add @rescriptbr/react-query @tanstack/react-query | ||
``` | ||
@@ -38,5 +38,2 @@ | ||
```rescript | ||
/* | ||
* Local bindings for fetch | ||
*/ | ||
module Fetch = { | ||
@@ -60,14 +57,11 @@ type response | ||
let make = () => { | ||
let queryResult = ReactQuery.useQuery( | ||
ReactQuery.queryOptions( | ||
~queryFn=fetchTodos, | ||
~queryKey="todos", | ||
/* | ||
* Helper functions to convert unsupported TypeScript types in ReScript | ||
* Check out the module ReactQuery_Utils.res | ||
*/ | ||
~refetchOnWindowFocus=ReactQuery.refetchOnWindowFocus(#bool(false)), | ||
(), | ||
), | ||
) | ||
let queryResult = ReactQuery.useQuery({ | ||
queryFn: fetchTodos, | ||
queryKey: ["todos"], | ||
/* | ||
* Helper functions to convert unsupported TypeScript types in ReScript | ||
* Check out the module ReactQuery_Utils.res | ||
*/ | ||
refetchOnWindowFocus: ReactQuery.refetchOnWindowFocus(#bool(false)), | ||
}) | ||
@@ -93,3 +87,6 @@ <div> | ||
<ReactQuery.Provider client> | ||
<div> <h1> {React.string("ReScript + React Query")} </h1> <TodoItem /> </div> | ||
<div> | ||
<h1> {React.string("ReScript + React Query")} </h1> | ||
<TodoItem /> | ||
</div> | ||
</ReactQuery.Provider> | ||
@@ -96,0 +93,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24539
197