Journey of a React App From Javscript to Typescript

Handling Props in Child and Parent Component Whenever we define a parent and a child component in React using Typescript, we must always define an Interface in the child component which defines what props child expects to recieve. By adding an interface to the child component, we are adding two big checks: In Parent Component: Are we providing the correct props to Child when we add it ti Parent? In Child Component: Are we using the correctly named + typed props in Child?...

March 18, 2023 · 3 min · Daman Arora

What Are Nested Routes and How to Implement Them Using React Router

Officially, Nested Routing is the general idea of coupling segments of the URL to component hierarchy and data. In my own words, a nested route is a region within a page layout that reacts to route changes. For example, in a single-page application, when navigating from one URL to another, you do not need to render the entire page, but only those regions within the page that are dependent on that URL change....

January 31, 2023 · 1 min · Daman Arora

Exploring the Core Redux Concepts

So, let’s try to explore the core redux concepts by creating a simple counter application. Redux Store First thing we need is a redux store. Let’s create one. const store = redux.createdStore(); Reducer This store is responsible to hold our data. The data it holds is determined by the reducer. The reducer has one job, i.e. to spit out a new snapshot of the store when an action occurs. So, the next thing we want to add is a reducer function....

January 26, 2023 · 2 min · Daman Arora

In order to understand Redux, you must understand Redux

I started learning Redux this week and while doing so, I realized that before I learn the core Redux library and the functions it has to offer, I’d be better off learning about the Redux as a design pattern for global state management. With a thorough understanding of the Redux design pattern, I can utilize the best tools available to implement the pattern (i.e. the Redux toolkit and Redux library) to their full potential....

January 23, 2023 · 2 min · Daman Arora

How to Use Formik to Create and Manage Forms in React

Formik is a form management library that provides components and hooks to ease the process of creating React forms. Formik takes care of form states, validation, and error handlers for you which makes it easy to collect and store user data. Following are the 2 of the best resources I have found online to learn formik.js: How to Use Formik to Create Forms in React Formik JS playlist by CodeEvolution

January 17, 2023 · 1 min · Daman Arora