Prevent react component from rendering twice when using redux with componentWillMount

前端 未结 3 1153
生来不讨喜
生来不讨喜 2020-12-24 05:56

I have a React component that dispatches a redux state change in its componentWillMount function. The reason is that when the component is loaded, it needs to g

3条回答
  •  失恋的感觉
    2020-12-24 06:41

    It looks like there's already an issue in the react-redux library.

    https://github.com/rackt/react-redux/issues/210

提交回复
热议问题