title: What is the life cycle of a React component in context of Redux?
body: <p>I'm trying to restructure my React app around Redux, and getting confused.</p>
  <p><a href="https://codeburst.io/props-and-state-in-react-native-explained-in-simple-english-8ea73b1d224e" rel="nofollow noreferrer">one site</a> says:</p>
  <blockquote>
  <p>Components receive props from their parent. These props should not be
  modified inside the component.</p>
  </blockquote>
  <p><a href="https://lucybain.com/blog/2016/react-state-vs-pros/" rel="nofollow noreferrer">another</a> says:</p>
  <blockquote>
  <p>You used to be able to change props with setProps and replaceProps but
  these have been deprecated. During a component’s life cycle props
  should not change (consider them immutable).</p>
  </blockquote>
  <p>So I should <strong>consider props to be immutable over a component's lifetime</strong>.  OK, then, the alternative is state (<em>React</em> state, which I understand is a very different thing from <em>Redux</em> state.  OK...)</p>
  <p>React state is the mutable state of the component.  It belongs to the component and, unlike props, <em>can</em> change during the component's life cycle.  OK.  Outside of the context of Redux, I totally get that.  Each component owns its own mutable state and passes what it needs to down to its children as props, which are for the children immutable.  When the state changes it will cause the component to re-render its children, giving them new props as needed.</p>
  <p>Now introduce Redux.  The Redux store holds a <em>single</em> state for the entire app.  Does this now <em>replace</em> any React state?  Are all of the elements of the Redux state delivered to React components as props?  There is <code>mapStateToProps</code> which seems to suggest this.  So can I now forget about React state entirely?</p>
  <p>I think of the component life cycle as lasting, say, as long as the user can see the thing on screen.  But if props can't change during the component life cycle, and everything is now (from the React perspective) props - does that mean the life cycle is only as long as it takes Redux to refresh its store?</p>