Photo by Filiberto Santillán on Unsplash

React Recoil is a contemporary state management library for React applications which is still in its experimental stage. It addresses many of the problems larger applications encounter when using the already known Context API.

Table of content

  • What does Recoil Do
  • How to utilize Recoil
  • Which are the React Functions
  • Recoil Root
  • Atoms
  • useRecoilState
  • Selectors

What does Recoil Do

Recoil enables you to initiate a data-flow graph that flows from atoms through selectors (pure functions ) and down into your React Components

How to utilize Recoil

Firstly it is required to install Recoil like any other package.

npm install recoil --save

Recoil Functions

React Recoil library utilizes five variant of…

Photo by Christian Erfurt on Unsplash

Learning to code could be fun as well as it could be mundane or frustrating, it all depends on how the learning process is followed.

When self-learning it takes a lot of discipline and grit to keep motivated, and it’s prevalent to keep studying coding till late night also mostly for long hours. But gradually, you are starting to get confused by some of the concepts and there isn’t anyone to ask for help.

You’ve sacrificed your free time, and sometimes haven’t watched Television and relaxed in a while. Also, having to miss the night out with friends sucks.


Photo by Pankaj Patel on Unsplash

One of the best ways to reduce the chances of bugs and also increase the readability of your codes is by writing fewer codes. This can also make testing a less daunting task compared to longer (spaghetti)codes.

Fortunately, in javascript, there are smarter ways to carry out tasks but we will be discussing four below

1. Utilize Array.includes for multiple conditions

Let’s take a look at the example below

function check(animal){
if(animal=='tiger'|| animal== 'lion') {

At the first look, the example above looks good. However, what if we include more cat family animals, say cheetah and leopard? …

Leonard Oguh

A software developer based in Lagos who loves to learn new things and teach what he learns

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store