Skip to content

Instantly share code, notes, and snippets.

@alexkrolick
Last active February 3, 2020 03:43
Show Gist options
  • Save alexkrolick/c2de33bc00318c8f02eb419975b369ba to your computer and use it in GitHub Desktop.
Save alexkrolick/c2de33bc00318c8f02eb419975b369ba to your computer and use it in GitHub Desktop.
redux-docs-wtf.md
  • Search "redux js"

    • Go to redux.js.org
    • "I know I should be using that toolkit thing, where is that?"
      • it's at the bottom of the navigation tree, ok, open that in a new tab
    • "What's the current package name for react-redux? Is it namespaced too now?"... how do I find that... googles it instead of looking in docs, now I am on a different docs site that looks kinda the same. Package name is under "getting started" > "install".
  • Going back to redux toolkit > click API

    • A friendly abstraction over the standard Redux createStore function that adds good defaults to the store setup for a better development experience.

      • lots of adjectives here but I don't know what about the defaults are good, better, or friendlier
    • API signatures are Typescript I guess? Kind of hard to wrap my head around them without code samples... where are those? Also these are the infamous single-letter generics, guessing "S" is state and "A" is action.
      • Oh, code samples are at the bottom of the page. Scrolling up and down.
    • "how do I actually use this?"
      • click "quick start"; ok these are install instructions, not setup
      • "basic tutorial"? starts with application reducer examples, not setup
      • "intermediate tutorial" this is converting some kind of existing app
      • "advanced tutorial" , this is assuming I read the previous ones, and is going to cover some specific things (typescript, async stuff) while building a "real world app" (seems like I would want mini-articles for those rather than lumping into a big one... moving on)
      • "usage guide" promising... there are lot of words here
        • "manual store setup" this looks good... but wait this is a "problem example"! I need something else
        • "Simplifying Store Setup with configureStore" ok pretty much this, but the code examples reference imports (like the reducer itself) that aren't defined yet
          • reducer stuff is below a bit, but again has the "bad example" then a way of rewriting it
          • I really want something that just says "make these these 3 files and here are the APIs you can use". Something I can just copy-paste and iterate on.
      • "API reference" > "configureStore" I am back here, I guess I'll copy the example and start going to the other methods and pasting their examples in...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment