Summary
In this chapter, we learned that JSX compiles JavaScript nested calls into createElement
functions in React, which allows us to mix HTML and JavaScript.
We learned that we can create a React component using functions with strongly typed props passed in as parameters. Now, we know that a prop can be a function, which is how events are handled.
The component state is used to implement behavior when users or other external things interact with it. Due to this, we understand that a component and its children are re-rendered when the state is changed.
By completing this chapter, we understand that React can help us discover problems in our app when it is run in strict mode. We also understand that a component is double rendered in strict mode when it contains state.
In the next chapter, we are going to style the home page.