React
React
Hello World in ReactJS
Hello World in ReactJS
There are some steps which are necessary to follow to start coding in React JS
. The Points which are important to start with are mentioned below -
- 1 - Set Up the Development Environment - We must have to make sure that we have
Node.js
and `...
Rendering Elements
Rendering Elements
In React.js
, rendering elements involves creating React components and rendering them to the DOM. Here's an example of how to render elements in React
.
The first step for showing the Rendering of the Elements in React JS
is to create the React ...
States and Lifecycles in React JS
States and Lifecycles in React JS
The components have a lifecycle consisting of different phases
or stages
. These phases allow you to perform specific actions at different points in a component's existence, such as initializing state, rendering content, and cleaning up resources. ...
Handling Events in React JS
Handling Events in React JS
Handling events
follows a similar pattern to handling events in regular HTML but with a few differences. Here's how we can handle events in React as mentioned below.
Event Binding
In the component's JSX
, we can attach event handlers by using ...
Introduction to JSX
Introduction to JSX
JSX
stands for JavaScript XML. It is a syntax extension for JavaScript that is commonly used in React.js
, a popular JavaScript library for building user interfaces. JSX
allows developers to write HTML-like code directly within JavaScript, ma...
Components and Props in React JS
Components and Props in React JS
In ReactJS, the components
are said to be the building blocks of user interfaces (UIs). They are reusable, self-contained pieces of code that encapsulate the logic and presentation of a part of the user interface. React uses a declarative syntax to ...
Conditional Rendering
Conditional Rendering
Conditional rendering
in React.js allows you to display different content or components based on certain conditions.
It enables you to control what gets rendered to the DOM based on the state of your application. Here are a few common techniques f...
Lists and Keys in React JS
Lists and Keys in React JS
The lists and keys
are used to render dynamic sets of elements. When you have an array of data and you want to render each item in the array as a component, we can use a list in React.
To render a list of items in React, you typically use the `map(...
Introduction to Redux
Introduction to Redux
Redux
is a state management library for React
and other JavaScript applications. It helps manage the state of an application in a predictable, centralized way, making it easier to reason about and maintain complex state interactions.
Redux
foll...
Types of components (class vs functional)
Types of components (class vs functional)
In React JS
, there are two types of components - class components
and `functional components``.
However, with the introduction of React Hooks in React 16.8, functional components have gained more capabilities and are now the preferred way of wri...
Using the useEffect hook
Using the useEffect hook
The useEffect hook
allows us to perform side effects in functional components. Side effects include things like fetching data, subscribing to events, or manually changing the DOM, which are operations that can't be done directly during the rendering...
Building custom hooks in React JS
Building custom hooks in React JS
Custom hooks
in React are a way to encapsulate reusable logic and stateful behavior into functions that can be used across multiple components.
They allow us to abstract away complex logic and share it easily between different parts of our applica...
Context API in React JS
Context API in React JS
The Context API
in React is a feature that allows us to manage and share state between components without needing to pass props through every level of the component tree. It provides a way to create a global state that can be accessed by any compone...
Forms in React JS
Forms in React JS
In React, forms
are created using the "form" element and managed using state. React provides a way to handle form inputs and their changes through the concept of controlled components, where the component state represents the value of the form input...
Lifting State Up in React JS
Lifting State Up in React JS
"Lifting state up" is a common pattern in React where we move the state of a component higher in the component tree to make it accessible to multiple components that need to share and synchronize that state. This allows us to have a single source ...
Composition vs Inheritance
Composition vs Inheritance
Composition and inheritance
are two fundamental concepts in object-oriented programming, including React JS
, for structuring and reusing code. However, React JS primarily favors composition over inheritance.
Composition
in React JS refers to th...
Prop drilling in React JS
Prop drilling in React JS
Prop drilling
is a term used in React JS to describe the process of passing props (properties) from a parent component to its child components, and potentially further down the component tree. It occurs when intermediate components in the hierarchy ...
Introduction to Hooks
Introduction to Hooks
Hooks are a feature introduced in React 16.8 that allow functional components to have state, side effects, and lifecycle methods, previously only available in class components. Hooks provide a more concise and flexible way to write components and mana...
Using the useState hook
Using the useState hook
The useState
hook is used to add state to functional components. Prior to the introduction of hooks, state could only be managed in class components, but with hooks, we can now use state in functional components as well. The useState hook
returns ...
UseMemo vs useCallback
UseMemo vs useCallback
Both useMemo
and useCallback
are hooks in React that are used to optimize performance by memoizing values or functions. They help in avoiding unnecessary recalculations and re-rendering of components.
The working of both in the descriptive manner...
Library
WEB DEVELOPMENT
Basic
Frontend
Express JS
React
Hello World in ReactJS
Rendering Elements
States and Lifecycles in React JS
Handling Events in React JS
Introduction to JSX
Components and Props in React JS
Conditional Rendering
Lists and Keys in React JS
Introduction to Redux
Types of components (class vs functional)
Using the useEffect hook
Building custom hooks in React JS
Context API in React JS
Forms in React JS
Lifting State Up in React JS
Composition vs Inheritance
Prop drilling in React JS
Introduction to Hooks
Using the useState hook
UseMemo vs useCallback
Backend
Interview Questions
FAANG QUESTIONS