ToDo app in ReactJS with Hooks & Context ...

ToDo app in ReactJS with Hooks & Context API

Mar 30, 2020

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 React.createContext.
New  Context will provide Provider and 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

Read more at https://time2hack.com/todo-app-in-react-with-hooks-context-api/

.

.

#frontend #javascript #react #reactjs #reacthooks #contextapi #todoapp #web #development #programming #html5 #js

Enjoy this post?

Buy Pankaj Patel a coffee