reading-notes

Code Fellows courses Notes

This project is maintained by QamarAlkhatib

State and Props


React lifecycle

Components can be defined as classes or functions in React. The methods you can use on these are referred to as lifecycle events. These methods are available throughout a component’s lifespan and allow you to adjust the UI and application states.

Questions Answers

  1. Based off the diagram, what happens first, the ‘render’ or the ‘componentDidMount’?
  1. What is the very first thing to happen in the lifecycle of React?

  1. Put the following things in the order that they happen: componentDidMount, render, constructor, componentWillUnmount, React Updates

    1. constructor
    2. render
    3. React Updates
    4. componentDidMount
    5. componentWillUnmount

  1. What does componentDidMount do?

React Bootstrat Documentation

Rebuilt with React

As one of the oldest React libraries, React-Bootstrap has evolved and grown alongside React, making it an excellent choice as your UI foundation.


Bootstrap at its core

Built with compatibility in mind, we embrace our bootstrap core and strive to be compatible with the world’s largest UI ecosystem.


Accessible by default

The React component model gives us more control over form and function of each component.


React State Vs Props

Props and state vary in that state is internal and controlled by the component, whereas props are external and controlled by whatever renders the component.

  1. What types of things can you pass in the props?
  1. What is the big difference between props and state?
  1. When do we re-render our application?
  1. What are some examples of things that we could store in state?

Things I want to know more about

Using the state and props in piece of code.