Steps for creating a React page - Tuong-Nguyen/JavaScript-Structure GitHub Wiki

  1. Break The UI Into A Component Hierarchy (composition)
  2. Build A Static Version in React
  3. Identify The Minimal (but complete) Representation Of UI State (State vs Prop)
  • Is it passed in from a parent via props? If so, it probably isn't state.
  • Does it remain unchanged over time? If so, it probably isn't state.
  • Can you compute it based on any other state or props in your component? If so, it isn't state.
  1. Identify Where Your State Should Live
  2. Add Inverse Data Flow (One-way: parent -> child)

For more detail: https://facebook.github.io/react/docs/thinking-in-react.html