⚛️ Hooks for fetching, caching and updating asynchronous data in React

Overview

React Query Header

Hooks for fetching, caching and updating asynchronous data in React

#TanStack semantic-release Join the discussion on Github Best of JS Gitpod Ready-to-Code

Enjoy this library? Try the entire TanStack! React Table, React Form, React Charts

Visit react-query.tanstack.com for docs, guides, API and more!

Still on React Query v2? No problem! Check out the v2 docs here: https://react-query-v2.tanstack.com/.

Quick Features

  • Transport/protocol/backend agnostic data fetching (REST, GraphQL, promises, whatever!)
  • Auto Caching + Refetching (stale-while-revalidate, Window Refocus, Polling/Realtime)
  • Parallel + Dependent Queries
  • Mutations + Reactive Query Refetching
  • Multi-layer Cache + Automatic Garbage Collection
  • Paginated + Cursor-based Queries
  • Load-More + Infinite Scroll Queries w/ Scroll Recovery
  • Request Cancellation
  • React Suspense + Fetch-As-You-Render Query Prefetching
  • Dedicated Devtools
  • (depending on features imported)

Become a Sponsor!

Contributors

Thanks goes to these wonderful people (emoji key):


Tanner Linsley

💻 🤔 💡 🚧 👀

Andrew Cherniavskii

💻 🐛

Thibaut Tiberghien

📖

Rohit Garg

🔧

Avinash

💻 🐛

Jason O'Neill

🚧 ⚠️

Jack Zhao

💻 🐛

dpyzo0o

💻

Jelte Liekens

💻

Jen Gettings

💻

Justin

💻

Marcelo Alves

💻

Zorza

📖

This project follows the all-contributors specification. Contributions of any kind welcome!

Comments
  • useQuery randomly not returning data and stuck in loading

    useQuery randomly not returning data and stuck in loading

    Describe the bug After upgrading to react-query 3.5.11 from 2.26.4 last week, our project's Cypress tests started failing randomly because the app started showing a loading spinner at random times. After a lot of head-banging, we finally tracked down the issue: even though, based on the network inspector, the request had gone through successfully, react-query's useQuery was returning an object with isLoading as true and data as undefined. Reverting back to react-query 2 fixed the problems.

    Most of the requests in our Cypress tests are stubbed using cy.server and cy.route. This probably shouldn't affect react-query but mentioning it here just in case.

    Our cache is configured in the following manner at the top of one of our source files, so this shouldn't be caused by us accidentally creating multiple caches:

    const queryCache = new QueryCache({
      defaultConfig: {
        queries: {
          staleTime: 10 * 60 * 1000,
          cacheTime: 15 * 60 * 1000,
          retry: (
            _failureCount,
            error: any,
          ) => error.status !== 403 && error.status !== 401,
        },
      },
    });
    
    // Further down:
    
    class AppProvider extends Component<{}, State> {
      public render() {
        return (
          <ReactQueryCacheProvider queryCache={queryCache}>
            {/* ... */}
          </ReactQueryCacheProvider>
        );
      }
    }
    

    To Reproduce Unfortunately, this happens randomly and is thus very hard to reproduce. The randomness does point towards some type of race condition. Our app performs many (~10) requests on startup.

    Even though which tests fail is random, I can consistently get at least one test to fail. Is there something I can do to help track down what could be the issue?

    Expected behavior useQuery should return the data it receives in the response once the request is successful.

    Desktop (please complete the following information):

    • OS: MacOS
    • Browser: Chrome
    • Version: 87

    Additional context Happens on both Cypress version 5.3.0 and 6.2.1.

    opened by vsaarinen 61
  • "No QueryClient set" when upgrading from 3.12.0 to 3.12.1

    Describe the bug

    When upgrading from [email protected] to [email protected], getting the following error in the browser console:

    QueryClientProvider.js:36 Uncaught (in promise) Error: No QueryClient set, use QueryClientProvider to set one
        at useQueryClient2 (QueryClientProvider.js:36)
        at ReactQueryDevtoolsPanel2 (devtools.js:267)
    

    To Reproduce

    git clone [email protected]:5ae9c1e18b571bafe17da22775b28329.git react-query-1936
    cd react-query-1936
    npm install
    npm run dev
    

    Open the dev server in the browser. You should see a blank page and observe the following error in the browser console:

    QueryClientProvider.js:36 Uncaught (in promise) Error: No QueryClient set, use QueryClientProvider to set one
        at useQueryClient2 (QueryClientProvider.js:36)
        at ReactQueryDevtoolsPanel2 (devtools.js:267)
    

    Now change the version of react-query in package.json to 3.12.0, run npm install and re-start the dev server (interrupt npm run dev and run it again). You should now see App on the page and no error in the console.

    released 
    opened by hmaurer 52
  • use discriminating union for query result type

    use discriminating union for query result type

    This PR adds back discriminated union types, I don't know where they create overhead and why they were removed, but I would argue that they are one of the few things that bring real benefits when using typescript.

    https://github.com/tannerlinsley/react-query/discussions/1102#discussioncomment-85980 https://github.com/tannerlinsley/react-query/discussions/922#discussioncomment-56912

    opened by MrLoh 45
  • feat(types): useQueries to flow through types

    feat(types): useQueries to flow through types

    Hello @tannerlinsley!

    Merry Christmas and thank you for react-query; it's awesome! 🎄

    I've just been trying out useQueries in react-query 3 and it's really cool! However one of the things I bumped on was the return type reliably being QueryObserverResult<unknown, unknown>[]. This means I have to assert the type before I can use it.

    This can be improved by supporting generics for useQueries just as useQuery does. This PR adds that support; very much modelled on the code of useQuery. It also adds a test which asserts that types flow through in the way we'd hope for.

    This should be a backwards compatible change; all existing users will be experiencing QueryObserverResult<unknown, unknown>[] and then having to subsequently assert types. That should all still work, but if they would like, they'll no longer need that code.

    What do you think?

    opened by johnnyreilly 42
  • V3 Umbrella Issue

    V3 Umbrella Issue

    Below are the official breaking changes and features for v3. If you have a feature request or idea, please use the Discussions tab to open a new discussion about that idea.

    Global:

    • [x] Remove usePaginatedQuery.
    • [x] Remove ReactQueryConfig.shared as it only contains one value.
    • [x] Change QueryConfig.enabled type to boolean but keep behavior.
    • [x] Change query key type to match with documentation (string | any[]).
    • [x] Remove react-query.mjs in favor of unbundled ESM files.
    • [x] QueryCache and Query async methods should throw and hook methods should not.

    Query:

    • [x] Rename clear() to remove().
    • [x] Remove refetch() in favor of QueryObserver.refetch(). The refetch() method on Query is redundant as the functionality is the same as fetch().
    • [x] Remove subscribe() as it is only used in the tests.
    • [x] Remove fetchMoreVariable argument from fetchMore() in favor of FetchMoreOptions.

    QueryCache:

    • [x] Remove global query cache.
    • [x] Remove makeQueryCache in favor of new QueryCache().
    • [x] Remove resetErrorBoundaries().
    • [x] Remove prefetch() options (force/throwOnError).
    • [x] Rename prefetchQuery() to fetchQuery().
    • [x] Change isFetching to isFetching() and do not store state.
    • [x] Remove true predicate option from getQueries() in favor of undefined.

    ReactQueryCacheProvider

    • [x] Make usage required. (Non-breaking, documented)
    • [x] Do not create query cache automatically.

    QueryObserver:

    • [x] Rename clear() to remove(). (Non-breaking deprecation)

    Query Config:

    • [x] Remove forceFetchOnMount.
    • [x] Change refetchOnMount false behavior to disable refetch on mount for that specific hook
    documentation enhancement help wanted v3 
    opened by tannerlinsley 41
  • Unable to use more than one apps with QueryClientProvider on page

    Unable to use more than one apps with QueryClientProvider on page

    Describe the bug In my scenario I need to host more than one react application on one page. Each of app uses react-query v3, app wrapped with QueryClientProvider (I can reproduce it with CRA apps with just your "overview" sample code (https://codesandbox.io/s/github/tannerlinsley/react-query/tree/master/examples/simple)). When I open page with these apps, only one of them running fine, and others fails with error: No QueryClient set, use QueryClientProvider to set one Maybe it's because of using window.ReactQueryClientContext for context storage of app, what makes impossible to use many react-query context on one page with many apps (https://github.com/tannerlinsley/react-query/blob/master/src/react/QueryClientProvider.tsx#L9).

    If I use just one app with many QueryClientProviders it's works ok.

    If you can suggest any workarounds for this issue, I will appreciate it. Thank you.

    To Reproduce Steps to reproduce the behavior:

    1. Build 2 apps with example from here: https://codesandbox.io/s/github/tannerlinsley/react-query/tree/master/examples/simple
    2. Host these 2 apps with one html page (I just build two CRA apps and then add div and scripts from one app index.html to another).
    3. Serve this overall html (I did just serve -s build).
    4. See error. First app crashes, but second runs fine.

    Expected behavior Every separate apps runs without react-query related errors and with react-query functionality.

    Additional context I tried to add some timeout for render of second app, and it's works but only for the first serve of html. Than, after page reload errors returns.

    setTimeout(() => {
      ReactDOM.render(
        <React.StrictMode>
          <App />
        </React.StrictMode>,
        document.getElementById("app2")
      );
    }, 1000);
    
    opened by NZainchkovskiy 40
  • Add queryCache de/rehydration

    Add queryCache de/rehydration

    This is a continuation of things described in issue #461. It's a breakout from the closed PR #570 and builds on the merged PRs #584 and #917.

    This PR adds a couple of new public APIs:

    • dehydrate(queryCache, dehydrateConfig)
    • hydrate(queryCache, dehydratedQueries)
    • A new hydration/ReactQueryCacheProvider-component with the additional dehydratedState-prop
    • useHydrate(dehydratedQueries) - A hook that does hydrate for you in a React-compatible way

    Together, this provides a way to dehydrate a cache, pass its serialized form over the wire or persist it somehow, and later hydrate those queries back into an active cache. Main goals are to improve support for server rendering and help with things like persisting to localstorage or other storage.

    An important feature of these new APIs is that the shape of the dehydrated cache is meant to be a private implementation detail that consumers should not rely on, which needs to be emphasized in the docs. This means that the de/rehydrate functionality can more easily be built upon in the future without breaking changes.

    SSR Example with Next.js

    ❗ This example previously looked different, but has been updated for useHydrate

    A minimal example:

    // _app.jsx
    import { ReactQueryCacheProvider } from 'react-query/hydration'
    
    export default function MyApp({ Component, pageProps }) {
      return (
        <ReactQueryCacheProvider initialQueries={pageProps.initialQueries}>
          <Component {...pageProps} />
        </ReactQueryCacheProvider>
      )
    }
    
    // pages/posts.jsx
    import { makeQueryCache } from 'react-query'
    import { dehydrate } from 'react-query/hydration'
    
    export async function getStaticProps() {
      const queryCache = makeQueryCache()
    
      await queryCache.prefetchQuery('posts', getPosts)
    
      return {
        props: {
          initialQueries: dehydrate(queryCache)
        }
      }
    }
    
    function Posts() {
      // This useQuery could just as well happen in some deeper child to
      // the "Posts"-page, data will be available immediately either way
      const { data } = useQuery('posts', getPosts)
    
      // This query was not prefetched on the server and will not start
      // fetching until on the client, both patterns are fine to mix
      const { data: otherData } = useQuery('posts-2', getPosts)
    
      // ...
    }
    

    Config options

    There are a few config options that you can set when dehydrating and hydrating. Most notably is the shouldDehydrate-function, that can filter the queryCache for queries to dehydrate. Usecase when dehydrating is to filter out only the queries you want to persist to localstorage for example.

    With or without shouldDehydrate, only successful queries are dehydrated from the cache

    dehydrateConfig

    type ShouldDehydrateFunction = <TResult, TError = unknown>(
      query: Query<TResult, TError>
    ) => boolean
    
    interface DehydrateConfig {
      shouldDehydrate?: ShouldDehydrateFunction
    }
    

    Questions

    These are a few questions I'm not totally certain about myself and might be worth an extra look when reviewing.

    ~~Should hydration be its own entry point?~~

    Solved, is now its own entry point

    ~~Should dehydrateQuery be included in the official APIs?~~~

    Solved, was removed in favour of a shouldDehydrate-function to keep the API lean. Could be exposed publically later on if there is need for it.

    ~~How should we handle updatedAt?~~

    Solved, updatedAt is now hydrated and also used for determining how far into the future staleness should be scheduled.

    Can naming be improved?

    There are a bunch of new public APIs, so let's get the naming juust right!


    I'm sure I've missed a bunch of stuff I wanted to highlight and/or ask, but hopefully this is a good start for getting feedback and questions. 😅

    released v3 
    opened by Ephem 40
  • Unable to use react-query when hooks are created in separate library

    Unable to use react-query when hooks are created in separate library

    Describe the bug

    I have a monorepo with yarn 3 workspaces consisting of the following (as well as other components):

    • contracts which uses Orval to create typed react-query hooks from OpenAPI
    • ui, a next.js project that has a workspace dependency on contracts and is using above hooks

    The only direct dependencies on react-query are through contracts, my UI project does not directly use react-query.

    I'm now running into a few issues to do with module resolution, and am not sure how much of this relates to yarn, workspaces, react-query, or next magic.

    React-query cannot find QueryProvider

    If I make react-query a peer dependency of contracts, then initialize react-query in my next project (set a query provider, etc), then the hooks that use react-query under the hood from contracts do not find the QueryClient. It appears to "see" its own version of react-query even though this is a peer dependency of contracts and I provide it as a direct dependency in ui.

    I am able to work around this by having contracts instead directly depend on react-query, and re-export the symbols from react-query (export * from 'react-query'). This appears to give the hooks incontracts` access to the same react-query and the context / query provider is found.

    ... or at least it was. Without any meaningful changes (I'm working on pinning down the exact change), I am no longer able to do it this way, as react-query now fails to find react. Inside the compiled code of react-query, I am getting React as an undefined symbol and this line blows up var defaultContext = /*#__PURE__*/React.createContext(undefined); iin react/QueryClientProvider.js

    I appreciate that this isn't much to go on, but in general, what is the recommended method for providing custom hooks based on react-query in a library in terms of dependencies and configuration of the query client?

    Your minimal, reproducible example

    N/A

    Steps to reproduce

    1. Build a library that leverages react-query in custom hooks with react-query as a peer dependency
    2. Use the library from above in a different project, providing react-query as a direct dependency
    3. Configure react-query with a QueryClientProvider in the dom where the hooks from 1 are being used

    Expected behavior

    React-query can "see" the context and query provider wired up in the react DOM, even when using peer dependencies and the react-query library is provided as a dependency form the parent project.

    How often does this bug happen?

    Every time

    Screenshots or Videos

    No response

    Platform

    • OS: Ubuntu 20
    • Yarn: 3.2.0
    • Next.js: 12.1.6

    react-query version

    3.39.0

    TypeScript version

    4.6.4

    Additional context

    No response

    opened by SoftMemes 38
  • Improve docs to avoid 'act' warning when using react-query in tests

    Improve docs to avoid 'act' warning when using react-query in tests

    This is sort of related to #270. Filing in case we can improve the docs to help others avoid this issue.

    When running tests, I ran into this error:

    console.error node_modules/react-dom/cjs/react-dom.development.js:88
        Warning: An update to _default inside a test was not wrapped in act(...).
    

    Here's the test:

    test('renders the component', async () => {
      await act(async () => {
        const { getByText } = render(<Component />);
        const linkElement = getByText(/Hello/i);
        expect(linkElement).toBeInTheDocument();
      });
    });
    

    And here's the component (simplified):

    const getPing = async () => {
      const { data } = await axios.get<{ content: string }>(
        getRoutePrefix() + 'ping'
      );
      return data;
    };
    
    export default function () {
      const { status, data, error, isFetching } = useQuery('ping', getPing);
    
      return (
        <>
          <div>Hello!</div>
    
          <div>{JSON.stringify(status)}</div>
          <div data-testid="testdata">{JSON.stringify(data)}</div>
          <div>Err: {JSON.stringify(error)}</div>
          <div>{JSON.stringify(isFetching)}</div>
        </>
      );
    }
    

    In #271 there was some cleanup logic added, however the error in my case appears to have been thrown before the cleanup call was fired.

    I can fix the issue by adding to my tests at the end of each act call:

    - import { render, wait } from '@testing-library/react';
    + import { render, wait, cleanup } from '@testing-library/react';
    
    test('renders the component', async () => {
      await act(async () => {
        const { getByText } = render(<Component />);
        const linkElement = getByText(/Hello/i);
        expect(linkElement).toBeInTheDocument();
    +   cleanup();
      });
    });
    

    Doing the cleanup outside the act does not help; that appears to be too late.

    Is it necessary to add the cleanup call inside every act call? If so, can we update the react-query docs on how to test with jest + react-testing-library? I bet others will run into this issue as well and hoping to save some time as more users adopt the library.

    Here's some screenshots with a debugger attached indicating the warning is originally caused by a call to refetch: Screen Shot 2020-05-01 at 12 07 49 Screen Shot 2020-05-01 at 12 18 59 Screen Shot 2020-05-01 at 12 11 30

    Versions:

    @testing-library/[email protected]
    [email protected]
    [email protected]
    [email protected]
    [email protected]
    [email protected]
    [email protected]
    
    documentation 
    opened by dustinsoftware 37
  • Support the ability to provide a context

    Support the ability to provide a context

    This adds support for passing in a context as other robust libraries (such as Redux) support: https://react-redux.js.org/api/provider#props.

    This is important as right now React Query supports creating multiple queryClient instances but does not currently support the ability to specify which queryClient instance should be used with useQueryClient. In the case of nested QueryClientProvider instances in an application, the ability to specify which context (and thus which QueryClientProvider and queryClient) should be used is critical. This adds such capability.

    These changes should be 100% backwards compatible.

    released on @beta v4 released on @alpha 
    opened by blackarctic 34
  • React Native: Queries not executing on v4

    React Native: Queries not executing on v4

    Describe the bug

    Hi,

    I'm trying out 4.0.0-beta.7 to implement offline support in our application.

    Everything is upgraded including all the breaking changes, but my queries are not being executed anymore. To be sure it's not a problem inside my application, I've created a fresh expo app with just the App.tsx file.

    When opening the app, my queries remain in a loading state. If I use the refetch of the useQuery, and run this in a useEffect, I'm able to execute the query.

    Your minimal, reproducible example

    Couldn't get react-query to work in expo snack

    Steps to reproduce

    1. Create a react-native application with the following package.json file
    {
      "name": "reactqueryv4",
      "version": "1.0.0",
      "main": "node_modules/expo/AppEntry.js",
      "scripts": {
        "start": "expo start",
        "android": "expo start --android",
        "ios": "expo start --ios",
        "web": "expo start --web",
        "eject": "expo eject"
      },
      "dependencies": {
        "expo": "~44.0.0",
        "expo-status-bar": "~1.2.0",
        "react": "17.0.1",
        "react-dom": "17.0.1",
        "react-native": "0.64.3",
        "react-native-web": "0.17.1",
        "react-query": "4.0.0-beta.7"
      },
      "devDependencies": {
        "@babel/core": "^7.12.9",
        "@types/react": "~17.0.21",
        "@types/react-native": "~0.64.12",
        "typescript": "~4.3.5"
      },
      "private": true
    }
    
    1. Create a query with a simple async function
    import { Text, View } from "react-native";
    import { QueryClient, QueryClientProvider, useQuery } from "react-query";
    
    export default function App() {
      const queryClient = new QueryClient();
    
      return (
        <QueryClientProvider client={queryClient}>
          <Todos />
        </QueryClientProvider>
      );
    }
    
    function Todos() {
      // Queries
      const query = useQuery(["todos"], async () => {
        console.log("this should log but doesn't");
    
        return Promise.resolve("ok");
      });
    
      console.log(query.data);
    
      return (
        <View>
          <Text>lol</Text>
        </View>
      );
    }
    
    1. Open your application and you will see undefined query data, a status loading and no console.log.

    Expected behavior

    I expect this query to be executed. If I change my package.json to the latest v3 version, my query get's executed as it should.

    How often does this bug happen?

    Every time

    Screenshots or Videos

    No response

    Platform

    • iOS, Android

    react-query version

    4.0.0-beta.7

    TypeScript version

    No response

    Additional context

    No response

    bug released on @beta v4 react-native 
    opened by sandergo90 33
  • Export default hydration methods for easier extension in `dehydrateOptions`

    Export default hydration methods for easier extension in `dehydrateOptions`

    Export defaultShouldDehydrateQuery and defaultShouldDehydrateMutation to make it easier to retain the default behavior when extending these in the dehydrateOptions

    opened by nahtnam 2
  • [vue-query]An error occurred when attempting to modify the data returned by useQuery

    [vue-query]An error occurred when attempting to modify the data returned by useQuery

    Describe the bug

    The data returned by useQuery is wrapped in a Ref object with an additional layer of Reactive wrapping inside. When I attempted to modify it, Vue gave me a warning that it is not modifiable. _20230104142307 _20230104142330

    Your minimal, reproducible example

    null

    Steps to reproduce

    In the Vue devtools, it shows as Reactive.

    Expected behavior

    [Vue warn] Set operation on key "desc" failed: target is readonly. Proxy {id: 67, name: 'library/xmrig/xmrig:v1', desc: '', image_list: Array(1), node_list: null, …}

    How often does this bug happen?

    Every time

    Screenshots or Videos

    No response

    Platform

    Win11 Chrome latest Vue latest

    TanStack Query version

    vue-query 4.20.5

    TypeScript version

    4.9.4

    Additional context

    No response

    needs-info package: vue-query 
    opened by Aicmortal 2
  • fix: set options for a query on setOptions in a queryObserver

    fix: set options for a query on setOptions in a queryObserver

    This PR attempts to close https://github.com/TanStack/query/issues/3706

    Opened questions

    • How to write a test for my fix? It looks quite complex, so I need an e2e test?

    @TkDodo fyi, cause you have the context of the issue)

    opened by artem-malko 3
  • refactor: remove contextSharing

    refactor: remove contextSharing

    This PR attempts to close #4681, one of the v5 react query milestone issues.

    I have:

    • Removed contextSharing from react-query and updated / removed the tests.
    • Removed contextSharing from solid-query and updated / removed the tests.
    • Removed contextSharing from vue-query and updated / removed the tests.
    • Removed the contextSharing documentation from the QueryClientProvider reference documentation
    • Added a section to the v5 migration guide about the removal of this property. I think this documentation could probably be better, I used information from both the issue #4681 and the linked discussion in #2810 to try and explain this. I suppose I could add an example of what I have described in this documentation, are there any good examples of how to document a code example for multiple packages like this within other parts of the documentation?
    opened by tludlow 3
Releases(v4.20.9)
Owner
Tanner Linsley
Husband, Co-Founder, Open source fanatic, React Junkie, Javascripter
Tanner Linsley
Promise based HTTP client for the browser and node.js

axios Promise based HTTP client for the browser and node.js New axios docs website: click here Table of Contents Features Browser Support Installing E

axios 98k Jan 3, 2023
Job scheduler and rate limiter, supports Clustering

bottleneck Bottleneck is a lightweight and zero-dependency Task Scheduler and Rate Limiter for Node.js and the browser. Bottleneck is an easy solution

Simon Grondin 1.4k Jan 3, 2023
JavaScript OAuth 1.0a signature generator (RFC 5849) for node and the browser

OAuth 1.0a signature generator for node and the browser Compliant with RFC 5843 + Errata ID 2550 and community spec Installation Install with npm: npm

Marco Bettiolo 230 Dec 16, 2022
Bearer provides all of the tools to build, run and manage API integrations.

Bearer - The API Integration Framework Bearer provides all of the tools to build, run and manage API Learn more Archive Status Bearer JS has been arch

Bearer.sh 22 Oct 31, 2022
Optic documents and tests your API as you build it

Optic uses real traffic to document and test your APIs Language agnostic, works with any Rest API Optic observes development traffic and learns your A

Optic 1k Dec 31, 2022
⚛️ Hooks for fetching, caching and updating asynchronous data in React

Hooks for fetching, caching and updating asynchronous data in React Enjoy this library? Try the entire TanStack! React Table, React Form, React Charts

Tanner Linsley 32k Dec 31, 2022
Cache is easy to use data caching Node.js package. It supports Memcached, Redis, and In-Memory caching engines.

Cache Cache NPM implements wrapper over multiple caching engines - Memcached, Redis and In-memory (use with single threaded process in development mod

PLG Works 49 Oct 24, 2022
React Hooks library for remote data fetching

Introduction swr.vercel.app SWR is a React Hooks library for remote data fetching. The name “SWR” is derived from stale-while-revalidate, a cache inva

Vercel 25.2k Jan 4, 2023
React Hooks library for remote data fetching

Introduction swr.vercel.app SWR is a React Hooks library for remote data fetching. The name “SWR” is derived from stale-while-revalidate, a cache inva

Vercel 25.2k Jan 8, 2023
A table component for your Mantine data-rich applications, supporting asynchronous data loading, column sorting, custom cell data rendering, row context menus, dark theme, and more.

Mantine DataTable A "dark-theme aware" table component for your Mantine UI data-rich applications, featuring asynchronous data loading support, pagina

Ionut-Cristian Florescu 331 Jan 4, 2023
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
This is a demo of updating a map to show air quality data for the user’s current location using Next.js Advanced Middleware, powered by Netlify Edge Functions.

Show Local Air Quality Based on the User's Location Use AQI data to show the air quality near the current user. This is built using Next.js Advanced M

Jason Lengstorf 8 Nov 4, 2022
🍉 Reactive & asynchronous database for powerful React and React Native apps ⚡️

A reactive database framework Build powerful React and React Native apps that scale from hundreds to tens of thousands of records and remain fast ⚡️ W

Nozbe 8.8k Jan 5, 2023
Fetching data from REST COUNTRIES API, this app (mobile version for now) gives information like area, population, capital, and borders for 195 countries from seven continents.

Space Travellers' Hub World Countries App works with an API which returns informations about 195 countries. Fetching data from REST COUNTRIES API, thi

Nicolae Pop 7 Aug 8, 2022
Stale-while-revalidate data fetching for Vue

swrv swrv (pronounced "swerve") is a library using the @vue/composition-api for remote data fetching. It is largely a port of swr. Documentation The n

Kong 1.8k Dec 29, 2022
A Cloudflare Worker for fetching data from Twitter User API.

cloudflare-worker-twitter This is a Cloudflare Worker for fetching data from Twitter User API. ❔ About this project I created this Worker to hide my A

Arda Soytürk 12 Oct 1, 2022
Wen? Now! A library to simplify your Web3 data fetching.

Wen Connect? Now! Minimalistic library for Web3 user interfaces. Seamless connection flows to Metamask. Stateless sessions that work anywhere (client,

Guillaume Bibeau-laviolette 20 Jul 20, 2022
:zap: RAN! React . GraphQL . Next.js Toolkit :zap: - SEO-Ready, Production-Ready, SSR, Hot-Reload, CSS-in-JS, Caching, CLI commands and more...

RAN : React . GraphQL . Next.js Toolkit New version is coming... Follow up here: https://github.com/Sly777/ran/issues/677 Features Hot-Reload Ready fo

Ilker Guller 2.2k Jan 3, 2023