Introduction to React

When you write React you will most of the time be writing components. Conceptually, components are like Javascript functions. They accept arbitrary inputs, called props, and return React elements which can be displayed through the virtual DOM. A component can pass variables down in the hierarchy to its subcomponents through props. Components can also include other components. Props can be used in many ways, for example, by passing text that the component should display, or booleans that decide if certain React elements are hidden or not. It is also possible to pass Javascript functions as props - which is a good way to allow a child component to modify its parent component. More on that later.