Day: July 19, 2021

  • Using Context in React

    Using context allows access of certain data within all components inside the “provider” without having to pass them as props to the children. First create the context: Then make the provider: Here, we import the context, and set up the data we want to share in the state and also a function that toggles the…