Skip to content

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

Merged
merged 2 commits into from
Jun 28, 2019

Conversation

SeanMcP
Copy link
Contributor

@SeanMcP SeanMcP commented Jun 28, 2019

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.

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.
@SeanMcP SeanMcP changed the title Break React-Redux example into multiple "files" Break React-Redux example into multiple "files" (code blocks) Jun 28, 2019
Copy link
Member

@Gpx Gpx left a 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


For this example, we'll have a simple reducer that tracks and updates `count`:

```
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch.

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kentcdodds kentcdodds merged commit 9a61fcf into testing-library:master Jun 28, 2019
@kentcdodds
Copy link
Member

@all-contributors please add @SeanMcP for docs

@allcontributors
Copy link
Contributor

@kentcdodds

I've put up a pull request to add @SeanMcP! 🎉

superT999 added a commit to superT999/testing-library-docs that referenced this pull request Feb 13, 2023
* 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)
web3gru pushed a commit to web3gru/testing-library-docs that referenced this pull request May 13, 2023
* 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants