Introduction

I started learning React JS to understand how modern, interactive web applications are developed. React is a JavaScript library used to build user interfaces, especially single-page applications (SPAs).

During my learning sessions, I explored how React makes frontend development easier through reusable components, efficient UI updates, and a component-based architecture.

This journal contains the important concepts, practical examples, and activities covered during my React JS learning journey.

1. Understanding React JS

The first step was understanding what React is and why developers use it.

Some important features I studied:

  • Component-Based Architecture: Dividing the user interface into small, reusable components.
  • Virtual DOM: React uses an in-memory representation of the UI to calculate and apply necessary updates.
  • JSX: Writing HTML-like syntax inside JavaScript.
  • One-Way Data Binding: Data flows from parent components to child components.
  • Reusable UI: Creating components that can be used in multiple places.
  • Large Ecosystem: Using different libraries and tools available in the React community.

I also studied the differences between the Real DOM and Virtual DOM and compared traditional web applications with Single Page Applications.

2. Setting Up a React Project

Next, I learned how to create a React application using Vite.

The basic setup process:

Step 1 – Install Node.js

Check the installed versions:

node -v
npm -v

Step 2 – Create a React application

npm create vite@latest myapp

Select React and JavaScript during setup.

Step 3 – Install dependencies

cd myapp
npm install

Step 4 – Start the development server

npm run dev

I also explored the basic Vite project structure, including src, public, App.jsx, and main.jsx.

3. Components, JSX and Props

Components are reusable pieces of a React user interface.

I learned how to create functional components and organize an application into smaller parts such as:

  • Navbar
  • Header
  • Footer
  • Product Card
  • Button
  • Page Components

I also studied JSX and its rules, including returning a single parent element and using JavaScript expressions inside JSX.

Another important concept was Props.

Props allow a parent component to pass data to a child component. They make components reusable and dynamic.

4. State and Event Handling

I explored how React handles user interactions and dynamically updates the interface.

Important concepts included:

  • Managing component state.
  • Handling button clicks.
  • Handling input changes.
  • Updating UI based on user actions.
  • Passing event handlers to components.

The useState hook was one of the most important topics because it allows functional components to store and update state.

5. React Hooks

I studied React Hooks and how they allow functional components to use state and other React features without class components.

Some of the hooks covered were:

  • useState: Managing component state.
  • useEffect: Handling side effects.
  • useRef: Storing values without triggering re-renders and accessing DOM elements.
  • useLayoutEffect: Reading layout information before the browser paints.
  • useCallback: Memoizing functions.
  • useMemo: Memoizing calculated values.
  • useReducer: Managing complex state transitions.
  • Custom Hooks: Reusing React logic across components.

I also explored the differences between useState and useReducer, and between useEffect and useLayoutEffect.

6. React Router and Navigation

I learned how to navigate between different pages without reloading the entire application.

Topics covered:

  • BrowserRouter
  • Routes
  • Route
  • Link
  • NavLink
  • useNavigate
  • Dynamic Routing
  • Nested Routing
  • Outlet

I also explored how dynamic routing can be used to display individual user details and how nested routing can render child pages inside a parent layout.

7. Working with APIs

One of the most practical topics was connecting React applications with backend APIs.

I learned that an API acts as a communication layer between the frontend and backend.

I studied the main HTTP methods:

  • GET: retrieve data
  • POST: create or send data
  • PUT: update existing data
  • PATCH: partially update data
  • DELETE: remove data

I practiced fetching data using the Fetch API and Axios.

I also explored:

  • Async/await
  • Displaying API data in components
  • Sending data to APIs
  • Updating and deleting records
  • Handling API responses

8. Forms and Validation

I studied controlled components, where the input value is managed by React state.

Practical examples included:

  • Registration forms
  • Login forms
  • Form input handling
  • Form validation
  • Submitting form data using Axios

This helped me understand how to build interactive forms and connect them with backend services.

9. Local Storage and Session Storage

I learned how browser storage can be used to store information as key-value pairs.

Important methods:

  • setItem()
  • getItem()
  • removeItem()
  • clear()

I also explored how to store JavaScript objects using JSON.stringify() and retrieve them using JSON.parse().

Practical examples included saving login state and working with localStorage and sessionStorage.

10. Redux and Redux Toolkit

As applications become larger, managing state across multiple components can become difficult.

I studied Redux as a global state management solution and explored how Redux Toolkit simplifies its implementation.

Important concepts:

  • Store
  • Actions
  • Reducers
  • Dispatch
  • Selectors
  • createSlice()
  • configureStore()
  • useSelector()
  • useDispatch()
  • Provider

I also explored asynchronous operations using createAsyncThunk, including loading, success, and error states.

Practical activities included:

  • Counter application using Redux Toolkit.
  • Light and dark theme toggle.
  • Fetching API data using createAsyncThunk.
  • CRUD Todo application using Redux Toolkit.

11. Advanced React Concepts

I continued exploring more advanced concepts to understand React application performance and reusable logic.

Topics included:

  • useRef and useLayoutEffect.
  • useCallback and useMemo.
  • useReducer and dispatch.
  • State transitions.
  • Custom Hooks.
  • Reusable logic using useLocalStorage.

I also studied how memoization can help avoid unnecessary calculations and renders.

12. Practical Application

As part of the learning activities, I explored the structure of a simple application containing:

  1. User Registration Page
  2. Login Page
  3. Home Page
  4. Product Page
  5. Cart Page
  6. Logout functionality

The project also introduced concepts such as protected routes, product data management, and shared cart state using Context.

This helped connect individual React concepts into a practical application structure.

Key Takeaways

Through these lessons, I gained a better understanding of:

  • Building reusable interfaces with React components.
  • Writing JSX and managing props.
  • Managing state and user interactions.
  • Using React Hooks.
  • Creating page navigation with React Router.
  • Connecting frontend applications to APIs using Axios.
  • Handling forms and browser storage.
  • Managing global application state using Redux Toolkit.
  • Organizing React applications into maintainable structures.

Conclusion

Learning React JS helped me understand how modern frontend applications are structured and developed.

The most valuable part of this learning journey was connecting theoretical concepts with practical activities. Concepts such as hooks, routing, API integration, and Redux Toolkit gave me a stronger foundation for developing full-stack applications.

I look forward to applying these concepts in real-world projects and continuing to improve my frontend development skills.