search

Home  >  Q&A  >  body text

javascript - How to get the data returned in the reducer in the component?

This is my reducer. After receiving the action, it will return an object. I have consoled this object and it exists.

This is the method of connecting the first parameter. The state of the console is only the requestUserInfo function, and there is no data returned in the reducer. Did I write something wrong somewhere? Or maybe I understand it wrong at all?

世界只因有你世界只因有你2832 days ago663

reply all(1)I'll reply

  • 扔个三星炸死你

    扔个三星炸死你2017-06-12 09:24:17

    You can use the container provided by flux to bind the store to your component, or subscribe to the store's event listener. Reference

    https://github.com/facebook/flux/tree/master/examples/flux-todomvc
    

    , it is recommended to understand its thinking before writing code

    reply
    0
  • Cancelreply