Thank you for reading this guide and we appreciate any contribution.
You can use the repository's Discussions page to ask any questions, post feedback or share your experience on how you use this library.
Whenever you find something which is not working properly, please first search the repository's Issues page and make sure it's not reported by someone else already.
If not, feel free to open an issue with the detailed description of the problem and the expected behavior. And reproduction (for example a CodeSandbox link) will be extremely helpful.
For new features, it would be great to have some discussions from the community before starting working on it. You can either create an issue (if there isn't one) or post a thread in the Discussions page to describe the feature that you want to have.
If possible, you can add other additional context like how this feature can be implemented technically, what other alternative solutions we can have, etc.
To run SWR locally, you can start it with any example in examples
folder. You need to setup the example and run command in the root directory for overriding SWR and its dependencies to local assets.
First of all, build SWR assets
# or `yarn watch`
yarn build
Install dependency of the target example, for instance examples/basic
:
cd examples/basic && yarn
After setup, back to the root directory and run:
# by default it will run next dev for the example
yarn dev-next basic
All examples are built with Next.js, so Next.js commands are all supported:
# if you want to build and start
yarn dev-next basic build
yarn dev-next basic start
To update the SWR Documentation, you can contribute to the website repository.