Skip to content
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

Create the Redux Essentials page, take 2 #3740

Merged
merged 61 commits into from
Jul 13, 2020

Conversation

markerikson
Copy link
Contributor

@markerikson markerikson commented Mar 29, 2020

PR Type

Does this PR add a new page, or update an existing page?

Adds the new "Quick Start" "Redux Essentials" page

Update: Ready!

Jump ahead to the request for review feedback:
#3740 (comment)

Checklist

What docs page is being added or updated?

  • Section: Tutorials
  • Page: Quick Start

For Adding New Content

What kind of content category is this page (tutorial, how-to, explanation, reference)?

The "Quick Start" page is a form of tutorial, but intended to demonstrate the "fastest" / "easiest" / "correct" way to use Redux without explaining why things work this way.

Who is the intended target audience?

Beginners who know nothing about Redux, yet.

What knowledge are we assuming they have?

  • JS syntax: ES6, async/await, object spreads
  • React: components, hooks
  • Other: HTTP / AJAX, fetch

What are the intended results or takeaways from reading this page?

Readers should be able to mimic the demonstrated patterns to create a basic React+Redux app that does some CRUD work.

What is the most critical info they should learn?

  • Redux is a tool for managing state outside of your React components
  • The Redux Toolkit package is the simplest and recommended way to use Redux
  • Key React+Redux APIs (configureStore, createSlice, useSelector / useDispatch)
  • Immutability is vital, but either requires hand-written updates or use of RTK+Immer "magic"

Status

This is a second attempt at writing this new "Quick Start" page, and supersedes #3675 .

Currently an early WIP, but I want the PR preview up so I can start getting feedback as I go.

I've gone ahead and created a new "Tutorials" category, moved the two existing "Basic/Advanced" tutorials under there, and added "Quick Start" under "Tutorials". This doesn't change any of the existing URLs, it's just sidebar organization.

Page Link

Direct link to the actual page being worked on:

https://deploy-preview-3740--redux-docs.netlify.com/tutorials/quick-start/quick-start-part-1

@netlify
Copy link

netlify bot commented Mar 29, 2020

Deploy preview for redux-docs ready!

Built with commit 16fcb8f

https://deploy-preview-3740--redux-docs.netlify.app

@github-actions
Copy link

github-actions bot commented Mar 29, 2020

Size Change: 0 B

Total Size: 8.97 kB

ℹ️ View Unchanged
Filename Size Change
dist/redux.js 6.41 kB 0 B
dist/redux.min.js 2.56 kB 0 B

compressed-size-action

Copy link
Member

@msutkowski msutkowski left a comment

Choose a reason for hiding this comment

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

I read this over a few times and overall it reads extremely well.

@markerikson
Copy link
Contributor Author

At the moment this is looking like it's going to be two parts:

  • Part 1: just explanation of terms and concepts, and walking through the actual structure of a React+Redux app using the standard CRA "counter" template.
  • Part 2: hands-on building a small blogging app using RTK.

I've got the first draft content of Part 1 basically done, and will try to put together Part 2 over the next few days.

I'm not convinced this sequencing and explanation is the right approach, but I want to get a complete first draft written so that we have something concrete to get feedback on so we can iterate from there.

@markerikson
Copy link
Contributor Author

markerikson commented Jul 11, 2020

Just pushed a sizeable update:

  • Addressed most of the comments from @taniarascia and @Matvien
    • Removed some unnecessary explanations and a leftover example
    • Clarified several explanations
    • Added a section on "Immutability" under "Concepts", before we even get to "Reducers"
  • Split Part 1 by extracting the entire "counter app walkthrough" section into a new Part 2, and renamed the later pages accordingly
  • Fixed up several TODO comments
  • Added a Redux dataflow diagram. (I'd like to redo this with some tweaks, but I need to figure out how to create good animated diagrams first)

Still debating renaming this. The best alternate ideas I've had so far are "Essentials Guide" and "Practical Guide".

@las3r
Copy link

las3r commented Jul 12, 2020

Part 2:

Detailed Explanation: Thunks and Async Logic
But, in a real Redux app, we're not allowed to import the store into other files, especially in our React components.
It is allowed and it works, but it is bad practice. Why is this a bad practise? Make us better devs by telling us why ;-)

- Redid "Getting Started" page by moving RTK first and removing most
  of the external tutorial links,
- Added RTK to "Installation" page
- Added description and "Best Practices" phrase to style guide
- Added external links to prereq concepts
- Fixed one-way data flow image
- Added "Tutorial" link to header/footer, pointing to Essentials
# Conflicts:
#	website/docusaurus.config.js
#	website/package.json
#	website/src/css/custom.css
@markerikson markerikson marked this pull request as ready for review July 13, 2020 02:20
@markerikson markerikson changed the title Create the "Quick Start" page, take 2 Create the ~~"Quick Start"~~ Redux Essentials page, take 2 Jul 13, 2020
@markerikson markerikson changed the title Create the ~~"Quick Start"~~ Redux Essentials page, take 2 Create the Redux Essentials page, take 2 Jul 13, 2020
@markerikson
Copy link
Contributor Author

Ready to Go!

Haven't gotten as much meaningful feedback as I'd hoped, but I think this is basically ready to go.

I've renamed it from "Quick Start" to "Redux Essentials". It's 25K words and 6 pages, so it's not "quick" at all, but it is the key information you need to get started using Redux.

I added a link to this as "Tutorial" in the header/footer, emphasized it in the "Getting Started" page, and added a new "Tutorial Index" page that describes the differences between the two sets of tutorials.

I also cleaned up the "Getting Started" page to remove most of the external article links, since there were too many of them and people have said they were overwhelming.

I plan on merging this in tomorrow :)

@markerikson
Copy link
Contributor Author

Going LIIIIIIVE!

@markerikson markerikson merged commit a38412e into master Jul 13, 2020
@markerikson markerikson deleted the docs/create-quick-start-take-2 branch July 13, 2020 13:44
alokreddy pushed a commit to alokreddy/redux that referenced this pull request Sep 30, 2020
* Port admonition and code block CSS from RTK site

* Restructure sidebars to add "Tutorials" section

* Add empty "Quick Start" tutorial page

* Bump Docusaurus to alpha.48

* Fix text color in admonitions

* Add blockquote styling for other pages

* Add DetailedExplanation component

* Initial Quick Start intro content

* Quick Start: add "What is Redux" and "Terms" sections

* Quick Start: add "play with app" content

* Quick Start: create nested folder and rename file

* Store setup

* Quick Start: add slice, reducer, immutability, and thunk sections

* Quick start: Add React-Redux section

* Quick start: emphasize immutability, highlight JSX

* Tweak "know more?" and explanation styles

* Fix typo and add thunk usage mention

* Bump Docusaurus to alpha.50

* Temporarily rename files to .md to work around DS bug

See facebook/docusaurus#2551

* Add border color for highlight lines

* Add code block titles and test line highlights

* Initial project setup section

* Add reducer and data flow explanations

* Tweak wording

* Link example repo and sandbox

* Update Docusaurus

* Fill out "Basic Data Flow" page

* Add additional phrasing

* Add intro and summary content for part 3

* Shrink code block file header padding

* Finish writing Part 3

* Link to Immer docs

* Add initial Part 4 content

* Finish Quick Start part 4

* Remove unnecessary uses of "just"

* Add Part 5 outline

* Update page titles

* Half of part 5

* Finish Quick Start content.  Yay!!!!!!

* Clean up tutorial part 1 based on review feedback

- Reworded several explanations
- Added "Immutability" section under "concepts"
- Added data flow diagram
- Removed leftover example code block

* Add "What You've Learned" to part 1

* Rename part 5 -> 6

* Rename part 4 -> 5

* Rename part 3 -> 4

* Rename part 2 -> 3

* Add new Part 2

* Fix up TODO comments and broken links

* Swap to new dataflow diagram

* Assorted edits and link fixes

* Rename "Quick Start" to "Redux Essentials"

* Fix links and rename images

* Update example app repo/sandbox links

* Clarify random seed behavior

* Rework introduction content

- Redid "Getting Started" page by moving RTK first and removing most
  of the external tutorial links,
- Added RTK to "Installation" page
- Added description and "Best Practices" phrase to style guide
- Added external links to prereq concepts
- Fixed one-way data flow image
- Added "Tutorial" link to header/footer, pointing to Essentials

* Remove unwanted colors from pagination buttons

* Emphasize recommended tutorial

* Clean up README

* Fix PR preview redirect

* Clarify "smallest amount" wording

* Try to fix redirects
webMasterMrBin pushed a commit to webMasterMrBin/redux that referenced this pull request Aug 21, 2021
* Port admonition and code block CSS from RTK site

* Restructure sidebars to add "Tutorials" section

* Add empty "Quick Start" tutorial page

* Bump Docusaurus to alpha.48

* Fix text color in admonitions

* Add blockquote styling for other pages

* Add DetailedExplanation component

* Initial Quick Start intro content

* Quick Start: add "What is Redux" and "Terms" sections

* Quick Start: add "play with app" content

* Quick Start: create nested folder and rename file

* Store setup

* Quick Start: add slice, reducer, immutability, and thunk sections

* Quick start: Add React-Redux section

* Quick start: emphasize immutability, highlight JSX

* Tweak "know more?" and explanation styles

* Fix typo and add thunk usage mention

* Bump Docusaurus to alpha.50

* Temporarily rename files to .md to work around DS bug

See facebook/docusaurus#2551

* Add border color for highlight lines

* Add code block titles and test line highlights

* Initial project setup section

* Add reducer and data flow explanations

* Tweak wording

* Link example repo and sandbox

* Update Docusaurus

* Fill out "Basic Data Flow" page

* Add additional phrasing

* Add intro and summary content for part 3

* Shrink code block file header padding

* Finish writing Part 3

* Link to Immer docs

* Add initial Part 4 content

* Finish Quick Start part 4

* Remove unnecessary uses of "just"

* Add Part 5 outline

* Update page titles

* Half of part 5

* Finish Quick Start content.  Yay!!!!!!

* Clean up tutorial part 1 based on review feedback

- Reworded several explanations
- Added "Immutability" section under "concepts"
- Added data flow diagram
- Removed leftover example code block

* Add "What You've Learned" to part 1

* Rename part 5 -> 6

* Rename part 4 -> 5

* Rename part 3 -> 4

* Rename part 2 -> 3

* Add new Part 2

* Fix up TODO comments and broken links

* Swap to new dataflow diagram

* Assorted edits and link fixes

* Rename "Quick Start" to "Redux Essentials"

* Fix links and rename images

* Update example app repo/sandbox links

* Clarify random seed behavior

* Rework introduction content

- Redid "Getting Started" page by moving RTK first and removing most
  of the external tutorial links,
- Added RTK to "Installation" page
- Added description and "Best Practices" phrase to style guide
- Added external links to prereq concepts
- Fixed one-way data flow image
- Added "Tutorial" link to header/footer, pointing to Essentials

* Remove unwanted colors from pagination buttons

* Emphasize recommended tutorial

* Clean up README

* Fix PR preview redirect

* Clarify "smallest amount" wording

* Try to fix redirects

Former-commit-id: af8c8ea
Former-commit-id: 35b5bcf
webMasterMrBin pushed a commit to webMasterMrBin/redux that referenced this pull request Aug 21, 2021
* Port admonition and code block CSS from RTK site

* Restructure sidebars to add "Tutorials" section

* Add empty "Quick Start" tutorial page

* Bump Docusaurus to alpha.48

* Fix text color in admonitions

* Add blockquote styling for other pages

* Add DetailedExplanation component

* Initial Quick Start intro content

* Quick Start: add "What is Redux" and "Terms" sections

* Quick Start: add "play with app" content

* Quick Start: create nested folder and rename file

* Store setup

* Quick Start: add slice, reducer, immutability, and thunk sections

* Quick start: Add React-Redux section

* Quick start: emphasize immutability, highlight JSX

* Tweak "know more?" and explanation styles

* Fix typo and add thunk usage mention

* Bump Docusaurus to alpha.50

* Temporarily rename files to .md to work around DS bug

See facebook/docusaurus#2551

* Add border color for highlight lines

* Add code block titles and test line highlights

* Initial project setup section

* Add reducer and data flow explanations

* Tweak wording

* Link example repo and sandbox

* Update Docusaurus

* Fill out "Basic Data Flow" page

* Add additional phrasing

* Add intro and summary content for part 3

* Shrink code block file header padding

* Finish writing Part 3

* Link to Immer docs

* Add initial Part 4 content

* Finish Quick Start part 4

* Remove unnecessary uses of "just"

* Add Part 5 outline

* Update page titles

* Half of part 5

* Finish Quick Start content.  Yay!!!!!!

* Clean up tutorial part 1 based on review feedback

- Reworded several explanations
- Added "Immutability" section under "concepts"
- Added data flow diagram
- Removed leftover example code block

* Add "What You've Learned" to part 1

* Rename part 5 -> 6

* Rename part 4 -> 5

* Rename part 3 -> 4

* Rename part 2 -> 3

* Add new Part 2

* Fix up TODO comments and broken links

* Swap to new dataflow diagram

* Assorted edits and link fixes

* Rename "Quick Start" to "Redux Essentials"

* Fix links and rename images

* Update example app repo/sandbox links

* Clarify random seed behavior

* Rework introduction content

- Redid "Getting Started" page by moving RTK first and removing most
  of the external tutorial links,
- Added RTK to "Installation" page
- Added description and "Best Practices" phrase to style guide
- Added external links to prereq concepts
- Fixed one-way data flow image
- Added "Tutorial" link to header/footer, pointing to Essentials

* Remove unwanted colors from pagination buttons

* Emphasize recommended tutorial

* Clean up README

* Fix PR preview redirect

* Clarify "smallest amount" wording

* Try to fix redirects

Former-commit-id: af8c8ea
Former-commit-id: 35b5bcf
webMasterMrBin pushed a commit to webMasterMrBin/redux that referenced this pull request Aug 21, 2021
* Port admonition and code block CSS from RTK site

* Restructure sidebars to add "Tutorials" section

* Add empty "Quick Start" tutorial page

* Bump Docusaurus to alpha.48

* Fix text color in admonitions

* Add blockquote styling for other pages

* Add DetailedExplanation component

* Initial Quick Start intro content

* Quick Start: add "What is Redux" and "Terms" sections

* Quick Start: add "play with app" content

* Quick Start: create nested folder and rename file

* Store setup

* Quick Start: add slice, reducer, immutability, and thunk sections

* Quick start: Add React-Redux section

* Quick start: emphasize immutability, highlight JSX

* Tweak "know more?" and explanation styles

* Fix typo and add thunk usage mention

* Bump Docusaurus to alpha.50

* Temporarily rename files to .md to work around DS bug

See facebook/docusaurus#2551

* Add border color for highlight lines

* Add code block titles and test line highlights

* Initial project setup section

* Add reducer and data flow explanations

* Tweak wording

* Link example repo and sandbox

* Update Docusaurus

* Fill out "Basic Data Flow" page

* Add additional phrasing

* Add intro and summary content for part 3

* Shrink code block file header padding

* Finish writing Part 3

* Link to Immer docs

* Add initial Part 4 content

* Finish Quick Start part 4

* Remove unnecessary uses of "just"

* Add Part 5 outline

* Update page titles

* Half of part 5

* Finish Quick Start content.  Yay!!!!!!

* Clean up tutorial part 1 based on review feedback

- Reworded several explanations
- Added "Immutability" section under "concepts"
- Added data flow diagram
- Removed leftover example code block

* Add "What You've Learned" to part 1

* Rename part 5 -> 6

* Rename part 4 -> 5

* Rename part 3 -> 4

* Rename part 2 -> 3

* Add new Part 2

* Fix up TODO comments and broken links

* Swap to new dataflow diagram

* Assorted edits and link fixes

* Rename "Quick Start" to "Redux Essentials"

* Fix links and rename images

* Update example app repo/sandbox links

* Clarify random seed behavior

* Rework introduction content

- Redid "Getting Started" page by moving RTK first and removing most
  of the external tutorial links,
- Added RTK to "Installation" page
- Added description and "Best Practices" phrase to style guide
- Added external links to prereq concepts
- Fixed one-way data flow image
- Added "Tutorial" link to header/footer, pointing to Essentials

* Remove unwanted colors from pagination buttons

* Emphasize recommended tutorial

* Clean up README

* Fix PR preview redirect

* Clarify "smallest amount" wording

* Try to fix redirects

Former-commit-id: af8c8ea
Former-commit-id: 35b5bcf
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.

10 participants