-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve readme #73
Improve readme #73
Conversation
To preview the rendered README: https://github.com/zeit/swr/tree/improve-readme |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a note describing that the key
parameter can also be a function that throws, returns null, or returns falsy values that cancels the request?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, way more detailed, maybe it should have use useSWRPages
as part of the library API documentation?
@@ -182,6 +202,60 @@ function App () { | |||
} | |||
``` | |||
|
|||
### Subscription (e.g.: socket.io) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this code be inside the examples folder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sergiodxa Yeah, I think we can add this model to your localStorage example using the storage
event. So we can sync the data without focusing on the other window.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting up socket.io for an example might be a bit overkill IMO.
@sergiodxa for |
We see people confusing about
fetch
, package names and other use cases. This PR tries to improve the README based on the feedback.Close #41, close #61.