Redux dispatch causing component local state to reset
问题 I'm using Redux with React. I'm using this.state (component local state) to save component specific variables. Problem is that my components state resets to initial state whenever I dispatch an action (fetch action) and Store updates (mounts). Is this the correct behavior for my component? Should the component's state reset when it mounts a second time (re-render)? If (1) is true, is there a way to preserve certain variable values in this.state when it receives new props from Redux store? I