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)
- Unexpected `revalidateIfStale = false` initial load behavior on key change HOT 1
- useSWR('key', fetcher) calls fetcher non-deterministically even when `key` is in the fallback
- Can I call both of onSuccess function in trigger options and useSWRMutation options?
- Fetcher isn't run again when error boundary resets using Suspense. HOT 1
- SWR should assert the data not be undefined if `isLoading` is false and `error` is null HOT 1
- Clarification Needed on Handling data for Optimistic Updates in useSWRMutation
- swr repeated render problem
- "isLoading" always true after clear the cache HOT 1
- Missing export of type `SWRInfiniteMutatorOptions` starting from 2.2.5
- Cache flaw: mutate of cache keys is ignored when no consuming hook is mounted
- Bound Mutate does not update state but useSWRMutation does HOT 2
- Infinite does not revalidate all pages when the zeroth one changes HOT 2
- Conditional rendering does not have correct type
- Bound/global mutate functions do not mutate remote data HOT 2
- bug: type error on updating cache with bound mutate HOT 1
- RSC Example doesn't work HOT 6
- onDiscarded is never called
- TypeError: Cannot read properties of null (reading 'useContext')
- useSWRInfinite with revalidateAll: true revalidates all pages when loading next page
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.