How do you mix componentDidMount() with react-redux connect()?

后端 未结 2 1949
长发绾君心
长发绾君心 2021-02-03 21:45

This seems like a simple use case but I can\'t figure it out. I want to display a list of items retrieved from a request to a remote API over HTTP. I would like the screen to sh

2条回答
  •  再見小時候
    2021-02-03 22:10

    This answer that I made some time ago give you an example of how to properly use connect and make an action call in the component. The only difference is that it's in componentWillMount for me :P

提交回复
热议问题