-
Notifications
You must be signed in to change notification settings - Fork 727
Break React-Redux example into multiple "files" (code blocks) #167
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
Conversation
The previous example put all the necessary variables into one file. However, this is unrealistic and I found it confusing when first reading through the docs. Instead, I've broken each chunk of this example into its own "file", which I think reads better and will be more applicable to a user's code base.
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.
I think it makes sense to separate the example in different blocks. It's more similar to what a real project might look like
docs/example-react-redux.md
Outdated
|
||
For this example, we'll have a simple reducer that tracks and updates `count`: | ||
|
||
``` |
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.
Let's specify a language for this codefence for syntax highlighting
```js
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.
Good catch.
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.
Thanks!
@all-contributors please add @SeanMcP for docs |
I've put up a pull request to add @SeanMcP! 🎉 |
* Break example into multiple "files" The previous example put all the necessary variables into one file. However, this is unrealistic and I found it confusing when first reading through the docs. Instead, I've broken each chunk of this example into its own "file", which I think reads better and will be more applicable to a user's code base. * Specify JavaScript language on code block Per @kentcdodds' PR comment: testing-library/testing-library-docs#167 (comment)
* Break example into multiple "files" The previous example put all the necessary variables into one file. However, this is unrealistic and I found it confusing when first reading through the docs. Instead, I've broken each chunk of this example into its own "file", which I think reads better and will be more applicable to a user's code base. * Specify JavaScript language on code block Per @kentcdodds' PR comment: testing-library/testing-library-docs#167 (comment)
The previous example put all the necessary variables into one "file" (code block). However, this is unrealistic, and I found it confusing when first reading through the docs.
Instead, I've broken each chunk of this example into its own "file", which I think reads better and will be more applicable to a user's code base.