How do we get our components to display?
ReactDOM.render()
- React-DOM - npm package dealing with DOM manipulations
- Primarily used for rendering the 'root' component of our React app
- Takes in the root React component of your app and the DOM Element that you're inserting it into as arguments
Example
render()
-
Used to display the component
-
Exists on class-based components
-
Takes in props and returns a React element
-
Called every time props or state changes