Comments (1)
Another update. I used 1.3.0 version and its working fine with a small code change.
requestInfo = [url, JSON.stringify(payload)]; --> requestInfo = [url, payload] (Looks like in 1.3 the stringify is no longer needed.
However!!!!!!!!!!! THE PROBLEM STARTS @ 2.0.1
I see a major change in this version upgrade. I went through the below change but unable to understand what it has impacted. I am able to understand the fetcher doesn't accept array anymore. At the same time unable to figure out the right way of providing the URL and request payload to the useSwr() method.
A quick help is much appreciated.
from swr.
Related Issues (20)
- onDiscarded is never called
- TypeError: Cannot read properties of null (reading 'useContext') HOT 1
- useSWRInfinite with revalidateAll: true revalidates all pages when loading next page HOT 1
- Cache specific key only
- useSWRMutation is not working with React Native New Architecture.
- useSWRInfinite does not return data until all pages are fetched HOT 2
- `useSWRSubscription` suspends forever, never calls `subscribe` when `suspense` is `true` HOT 1
- isLoading is initially false when there is no data for conditional queries.
- sometimes it automatically request again ,but the key has not changed
- Calling `setSize` before pages finish loading causes `useSWRInfinite` to trigger multiple requests HOT 2
- Visiting 404 Not Found clears all SWR Cache
- useSWRInfinite has missing types
- Error couldn't be catched
- Fetcher argument type inference fails when useSWR-hook is explicitly typed
- Situation where optimisticData does not update cache HOT 1
- The same request parameters cannot be written to the cache after the interface reports an error, and then another request is initiated until the interface returns normal data. How to change this behavior so that errors reported by the interface are also entered into the cache, and requests are no longer initiated. HOT 1
- Deduplication not working properly HOT 2
- Global mutate does not invalidate `useSWRInfinite` requests HOT 1
- Passing an array of keys doesn't cache the keys individually HOT 1
- preload is invalid when use array key, Does it only work in string key ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swr.