useReducer Vs Redux Explained Simply

If you program long enough, you will make the mistake of “premature optimization”. Premature optimization simply means you put the cart before the horse and made your application too complex. Redux is a framework where this happens quite frequently. The useReducer hook is a way to manage state in React….

read more

React useEffect Explained Simply

In useEffect, the word “effect” refers to a functional programming term called a “side effect”. To really understand the concept of a side effect, we must first have a grasp of a pure function. React components are intended to be pure functions, meaning they receive a input and produce a…

read more

UseRef in React Explained Simply

When you want to persist values between renders, you use “a ref”. First, you must add the ref to your component by import useRef Hook from React: Call the useRef Hook and pass the initial value that you want to reference as the only argument. useRef returns an object that…

read more

React State Explained Simply

Explaining state is a very difficult concept simply because it is so broad. It is sometimes best to explain complicated things by explaining what they are NOT: State Is NOT: These items are not state because they don’t change from page to page and are static. State IS: These are…

read more

React Rendering Explained Simply

Before components are displayed on the screen, they must be rendered by React. Understanding the steps in this process will help you think about how your code executes. Imagine that components are cools in the kitchen, assembling tasty dishes from ingredients. In this scenario, React is the waiter who puts…

read more