feat(ssr): support SSR in Deno
I use react-query in Deno:
import { QueryClient, QueryClientProvider, useQuery } from 'https://esm.sh/react-query';
const queryClient = new QueryClient();
export default function App() {
return (
<QueryClientProvider client={queryClient}>
<Example />
</QueryClientProvider>
);
}
function Example() {
const { isLoading, data } = useQuery('repoData', () => Promise.resolve({ name: 'foo' }));
if (isLoading) return 'Loading...';
return <div>{data.name}</div>;
}
It output a warning:
This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/tannerlinsley/react-query/B1CzdniC4Wahnn8NkLb2S5QCimdb
✅ Preview: https://react-query-git-fork-justjavac-patch-1-tannerlinsley.vercel.app
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit 833b95ab4612dd23cc99acb9306d7a03cfe31faa:
| Sandbox | Source |
|---|---|
| tannerlinsley/react-query: basic | Configuration |
| tannerlinsley/react-query: basic-typescript | Configuration |