Skip to the content.

Home Page

Class 05 Notes

React Docs - Thinking in React

To break a mock into component hierarchy you’d first have to draw boxes around all the components. You would do this by using the single responsibility principle. This means deciding what section has one job. Components often do one thing so this principle is good for this kind of code block.

Building a static version of your application means to build an app with no interactivity and no state. After you have a static verison you need to identify the minimal representation of UI state.

The three questions you can ask to determine if something is state are:

You can identify where state needs to live by:

Things I want to know more about