Skip to content

Pass url param to react-query integration #500

Closed Answered by lwhiteley
lwhiteley asked this question in Q&A
Discussion options

You must be logged in to vote

As a side note, I started looking into jotai as a way to manage a client heavy state component for an app that already uses react-query.

What interested me was the react-query integration and also the recipe for managing large objects. it is pretty neat

With that i had to ensure that only one query client was being used so this is what i did

import React, { useEffect } from 'react';
import { QueryClientProvider, QueryClient } from 'react-query';
import { queryClientAtom } from 'jotai/query';
import { useUpdateAtom } from 'jotai/utils';

const queryClient = new QueryClient();

export const JotaiQueryProvider = ({ children }) => {
  const setQueryClient = useUpdateAtom(queryClientAtom);

  u…

Replies: 3 comments 44 replies

Comment options

You must be logged in to vote
35 replies
@dai-shi
Comment options

@lwhiteley
Comment options

@lwhiteley
Comment options

@dai-shi
Comment options

@lwhiteley
Comment options

Comment options

You must be logged in to vote
9 replies
@lwhiteley
Comment options

@dai-shi
Comment options

@dai-shi
Comment options

@dai-shi
Comment options

@lwhiteley
Comment options

Answer selected by lwhiteley
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants