React Js

React Js

framework used to build dynamic, component-based user interfaces for web applications.

react js

Articles

Setting Up a React Project with Vite – Fast Start, Modern Structure, and Focused Learning

Vite is a modern build tool that makes starting a React project fast and intuitive. With sensible defaults and high extensibility, it allows developers to focus on learning React without being distracted by complex tooling. This article walks through setting up a React project with Vite, understanding the project structure, and upgrading React if needed.

/article/setting-up-react-project-with-vite-fast-start-modern-structure

npm Scripts and Your First React Component – Running the App, Building for Production, and Understanding Component Structure

This article introduces the npm scripts defined in your React project’s package.json file, which are used to run, build, and lint your application. It also walks through your first React component in App.jsx, simplifying it to focus on the fundamentals of JSX, function components, and variable scope inside and outside the component.

/article/npm-scripts-react-first-component-run-build-structure

JSX in React – Mixing HTML and JavaScript for Dynamic Interfaces

JSX is a syntax extension for JavaScript that allows developers to combine HTML and JavaScript inside React components. This article explains how to use variables, functions, and data structures in JSX, highlights key differences from native HTML, and shows how JSX enables declarative UI development.

/article/jsx-in-react-mixing-html-javascript-dynamic-interfaces

Rendering Lists in React – Using map() and JSX to Display Dynamic Data

In React, the map() method is commonly used to transform arrays of data into JSX elements. This article explains how to render lists using map(), the importance of the key attribute, and how to display multiple properties of each item. It also highlights JSX-specific syntax differences and best practices for rendering dynamic content.

/article/rendering-lists-in-react-using-map-and-jsx

Multiple Components in React – Structure, Instantiation, and Hierarchical Growth

In React, each component represents a self-contained unit of logic and UI. As your application grows, components should be split into smaller parts to maintain clarity and scalability. This article explains how to extract components, build a component hierarchy, and instantiate components in JSX — with practical examples and analogies to JavaScript classes.

/article/multiple-components-in-react-structure-instantiation-hierarchy

React DOM and Component Instantiation – Connecting to HTML, Function Styles, and JSX Event Handlers

This article explores how React connects to the HTML world using React DOM, how components are instantiated in JSX, and the different styles for declaring function components. It also introduces JSX event handlers for user interaction, laying the foundation for dynamic and maintainable React applications.

/article/react-dom-component-instantiation-function-styles-jsx-handlers

React Props – Passing Data Between Components in a Scalable Way

Props are the primary mechanism for passing data from one React component to another. This article explains how to move data from global scope into the App component, pass it down to child components using props, and extract reusable components like Item from List. It also covers best practices, immutability, and the role of the key attribute in list rendering.

/article/react-props-passing-data-between-components

props are immutable and used to pass data from parent to child.

In React, props are immutable and used to pass data from parent to child. For dynamic, changeable data, React provides state — a mutable structure managed with the useState hook. This article explains how to define and update state, how it triggers re-rendering, and how React tracks state internally. It also introduces the concept of hooks and the role of StrictMode in development.

/article/react-state-managing-dynamic-data-with-usestate

Callback Handlers and Lifting State in React – Component Communication and Shared Data Management

In React, props allow data to flow from parent to child, but not the other way around. To enable upward communication, we use callback handlers — functions passed down as props and invoked in child components. This article explains how to define and use callback handlers, and introduces the concept of lifting state to manage shared data at the appropriate component level.

/article/callback-handlers-and-lifting-state-in-react

Controlled Components and Advanced Props Handling in React

In React, controlled components use state to manage the behavior of form elements. This article explains how to synchronize input fields with React state, how to define controlled components, and how to use advanced props techniques like object destructuring and nested destructuring to write cleaner, more maintainable code.

/article/controlled-components-and-advanced-props-in-react

Side Effects in React – Synchronizing State with localStorage Using useEffect

In React, a component’s output is usually determined by its props and state. But sometimes we need to interact with external systems like localStorage or APIs — these are called side-effects. This article explains how to use the useEffect hook to manage side-effects, synchronize state with localStorage, and improve user experience by persisting data across browser sessions.

/article/react-side-effects-sync-state-with-localstorage-useeffect

Custom Hooks in React – Building useStorageState to Sync State with localStorage

React’s built-in hooks like useState and useEffect are powerful tools for managing state and side-effects. This article introduces the concept of custom hooks by building useStorageState — a reusable hook that synchronizes component state with the browser’s localStorage. We explore naming conventions, return patterns, and how to make hooks flexible and maintainable.

/article/react-custom-hooks-sync-state-with-localstorage