Coder Social home page Coder Social logo

Comments (3)

kodyclemens avatar kodyclemens commented on June 29, 2024 2

@micahshute thanks for opening this issue with your explanation, it was very helpful.

from redux-thunk-lab.

thekevinhuang avatar thekevinhuang commented on June 29, 2024 1

I also agree with the above concerns. The language brought up in concern 1 had me very confused until I essentially chose to ignore it and figure it out on my own.

For concern 3, one pattern I found to be extremely nice when establishing a store structure is declaring it upfront as a const. Then when setting initial state you can set it equal to the const e.g.

`const initialState = {
loading : false,
pictures: []
}

function reducer (state=initialState, action) {
...
}`

This way it is clear what is expected and what the structure will be right from the get go. Including this info in the readme would have been tremendously helpful.

from redux-thunk-lab.

maxwellbenton avatar maxwellbenton commented on June 29, 2024

Hey @micahshute,

Thanks for this. I've updated this lab and the previous lesson to address some of these issues.

  1. Because there isn't enough material on thunk and the previous example is just a readme, I've converted this lab to be much more guided and have rewritten it to go through the set up of redux and thunk. The expected actions and structure have changed, but most of the code is provided in the readme now, including the structure of actions and how the action creator should be written. There is also now a section that provides a bit more context to the purpose of LOADING_CATS.

  2. mapStateToProps and mapDispatchToProps are now used in the code-along with a working code snippet example and a note that dispatch can still be called in App, even though we're now dispatching in the action creator.

  3. Now that it is a code-along, the state structure is provided.

I believe these changes should resolve the issues brought up here, but if not, please feel free to reopen. Thanks again for the thorough feedback!

from redux-thunk-lab.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.