#1 India's Top IT Training Institute
×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
Mentors

Mentors

Meet the industry experts who train and guide you through your course.

Read More →
Free Resources

Free Resources

Free tutorials, interview questions, tools and calculators to help you learn.

Explore →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →
React Fundamentals

React Development Environment

A React development environment is the set of tools on your computer that lets you write React code, see changes instantly in the browser, and later produce an optimised build. Browsers cannot run JSX or resolve import statements from npm packages on their own, so a build tool sits in the middle, translating your code on the fly while you work. Setting this up properly once makes every later lesson smoother.

What you need installed

  • Node.js, preferably a current LTS release. It runs the build tools on your machine. React code itself runs in the browser, not in Node.
  • npm, which comes with Node.js, to install packages such as React. Alternatives like pnpm or Yarn work the same way.
  • A code editor. Visual Studio Code is popular, with extensions for ESLint and Prettier to catch mistakes and format code.
  • A modern browser plus the React Developer Tools extension, which adds Components and Profiler tabs to the dev tools.

Check your installation in a terminal with node -v and npm -v. Both should print a version number.

Creating a project with Vite

Vite is a fast build tool and a common starting point for new React projects. Create React App, which many older tutorials use, is no longer recommended for new apps. Frameworks such as Next.js are another route when you need server rendering, but a Vite project keeps the focus on React itself while learning.

# create a project from the React template
npm create vite@latest my-app -- --template react

cd my-app
npm install        # download React and the build tools
npm run dev        # start the dev server, usually on http://localhost:5173

Open the printed address in your browser. Edit src/App.jsx, save, and the page updates within a moment without losing component state. This is called hot module replacement.

A tour of the generated files

File or folderRole
index.htmlThe single page; contains <div id="root"> where React renders
src/main.jsxEntry point that calls createRoot and renders <App />
src/App.jsxYour first component
package.jsonLists dependencies and the dev, build and preview scripts
node_modules/Installed packages; never edit or commit it
public/Static files copied as they are, such as icons

Setup problems people hit

If you see "npm is not recognized" or "command not found", Node.js is either not installed or not on your system path; reinstall it and open a fresh terminal. If the dev server fails right after cloning someone else's project, you probably skipped npm install, since node_modules is not stored in Git.

Another source of confusion is file extensions. In a Vite project, components containing JSX should use .jsx (or .tsx for TypeScript), otherwise you may get a parse error. Also keep your project folder away from cloud-synced directories, which can slow down or lock files in node_modules.

The short version

Install Node.js, create the project with Vite, run npm install and npm run dev, add the React Developer Tools extension, and keep node_modules out of version control.

Ready to master real-world web development?

Learn HTML, CSS3, Bootstrap and JavaScript hands-on with mentor-led sessions.

Explore Course