Replies: 2 comments
-
Beta Was this translation helpful? Give feedback.
0 replies
-
The misbehaviour comes from the use of Webpack, I have created an issue based on this discussion: #1880 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
EDIT: The misbehaviour comes from the use of Webpack, I have created an issue based on this discussion: #1880
I try to implement the localstorage based cached as documented here: https://swr.vercel.app/docs/advanced/cache#localstorage-based-persistent-cache
I have three files:
The Map from the cache stays empty and doesn't seem to get affected by any changes from the NewsApp that are passed to the useArticles hook...
These are the three mentioned files and there connection:

I tried useSWRConfig in the index.js to check if the SWRConfig from start.js properly works, this looks good:

Idk if this can have effects but im not using a SPA (like create-react-app or NextJS), in this case I have to work with a classic server side rendered site which initialises React after the site has loaded via plain js.
Thank you for you help!
Beta Was this translation helpful? Give feedback.
All reactions