Skip to content

#3595, Barebones Tutorial #3642

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

Closed
wants to merge 13 commits into from
Closed

#3595, Barebones Tutorial #3642

wants to merge 13 commits into from

Conversation

richardcrng
Copy link

Barebones tutorial (part of #3595 )

PR Type

  • Adds a new category, 'Tutorials'
  • Adds a new page under that category, 'Barebones Tutorial'

Checklist

For new content

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

Tutorial

Who is the intended target audience?

Newcomers to Redux (who might also be relatively new to Javascript)

What knowledge are we assuming they have?

Basic Javascript

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

They should know:

  • What an action is
  • What a reducer is, in the context of Redux
  • How they could use an action payload
  • What an action creator is
  • How to create a Redux store
  • How to use store.getState() and store.dispatch

What is the most critical info they should learn?

  • Actions are plain Javascript objects that have a type property
  • Reducers have the signature (state, action) => newState and should cause no mutations or side-effects
  • An action can be given a payload to provide additional information beyond type to a reducer
  • An action creator is a function that returns an action
  • createStore takes a reducer function as an argument and returns a store which uses that reducer
  • store.getState() retrieves the current state held by the store
  • store.dispatch(action) updates the store's state by passing its current state and action to the store's reducer

Other notes

This page is quite long. I think that, if used, it would be more suited to having 'Barebones Tutorial' as a subcategory under 'Tutorials', with a single page then dedicated each to Actions, Reducers, Payloads, Action creators, and the Store, but wanted to check what thoughts were on that before I made that change.

It also might not be the style of thing that you want on the docs - I think the material is probably more naturally suited to a video-ish thing. No offence taken if that's the decision, as I can reuse this elsewhere.

@netlify
Copy link

netlify bot commented Nov 27, 2019

Deploy preview for redux-docs ready!

Built with commit 743735f

https://deploy-preview-3642--redux-docs.netlify.com

@markerikson
Copy link
Contributor

Thanks for putting this together! Given the holiday week and some upcoming business travel, I may not have time to look through it right away, but I'll make sure I get to it in the near future.

@richardcrng
Copy link
Author

@markerikson, can I nudge you on this? (I'll quite happily reuse this elsewhere with no offence taken if you don't want it for the official docs)

@markerikson
Copy link
Contributor

I really appreciate the PR and the effort you've put into this, but I'd like to hold off on it for now. Given how critical the tutorial section is, I think we need to put some serious thought and planning into the exact structure, sequence, and content of the tutorials as a whole, so that it all combines into a coherent whole.

It's worth keeping this PR around as a reference for when we do that planning, though.

@timdorr
Copy link
Member

timdorr commented Jul 14, 2020

Closing since we have the new essentials guide.

@timdorr timdorr closed this Jul 14, 2020
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