Skip to content

Commit

Permalink
Update react-query.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
IdoPesok authored Aug 29, 2024
1 parent 0084871 commit 2bf3b2a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions examples/showcase/content/docs/react-query.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@ groupOrder: 6

It's likely that you may need to use your server actions for querying data on the client side. In order to do this, we recommend using `zsa` with `@tanstack/react-query` (aka [React Query](https://tanstack.com/query/latest/docs/framework/react/overview)).

<Warning>
**IMPORTANT**: Although it is available in the library, please be advised against using server actions to query data. Server actions are currently optimised for mutations. This may be deprecated in the future. Apologies for any confusion. For better results, you should create an API route and fetch data normally using a GET request.
</Warning>

<Note>
*React Query* is the leading solution for asynchronous querying and state
management in React. By using React Query, you will have all the functionality
of React Query for using your `zsa` server actions on the client side.
</Note>

<Warning>
Please use the latest version of `@tanstack/react-query` for best
results.
</Warning>

## Installation

To get started, make sure you have installed `zsa-react-query` and `@tanstack/react-query`:
Expand Down

0 comments on commit 2bf3b2a

Please sign in to comment.