Mar 30, 2020
1 mins read
Today, Making a React app is very easy and fast as compared to in the past.
This is the time of Functional Components, Hooks and Context API. Let’s remake our todo app from the past with Modern React.
First; What are React Hooks and Context API?
Hooks: Hooks are the construct in React app development which will allow you to extract the state logic of a component and make it reusable and testable.
Read more about the hooks here: Introducing Hooks – React
Context API: Context API provides you with a way to share data among components in the component tree without needing to pass props to components which are not going to use that data.
Read more about the Context API here: Context – React
Context API requires the creation of Context via
New Context will provide
Consumer components of that Context.
Provider will allow you to change the data of Context
Consumer will allow you to listen to the changes in the Context