-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
fix(docs): Add how to reset state to docs/guides section #1236
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 8bc6fc0:
|
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.
Would you create a codesandbox example and add a link?
@dai-shi how I can do that?. BTW, there's a way to see the docs locally? |
Just create a codesandbox with https://react.ts.new and copy&paste the code, and see if it's working. No, I don't think there is such a way. |
@dai-shi here's the demo -> https://codesandbox.io/s/wispy-mountain-gtu0qe?file=/src/App.tsx |
Cool. Please put it in the md file. If you can, try to make the demo a little more fancy by showing both "salmon" and "tuna" counts and adding three buttons (addSalmon, addTuna, reset). |
@dai-shi sure I'll do it tomorrow. I'll add the codesandbox to the md and I'll update the codesandox to show both. |
I've been able to run locally (well kind of locally) by doing the following:
Temporary change just while working locally
The docs path is:
|
@chrisk-7777 cool, good to know. I'll work on that later to make it simple (just one command). |
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.
hmm, tbh, I prefer the codesandbox example for basic usage, not with slices. Sorry if my comment was confusing. You don't need to remove the current example, but add a new one. You can just have two codesandbox links in the doc.
@dai-shi yeah I was thinking on that. I can create two codesandbox if that's ok. |
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.
LGTM!
Related Issues
Fixes #1008
Summary
Move how to reset state to ./docs
Check List
yarn run prettier
for formatting code and docs