KaushikBhalara / React-Learning

Created with StackBlitz ⚡️
https://stackblitz.com/edit/react-1gwy7t
0 stars 0 forks source link

Create a basic project #1

Open KaushikBhalara opened 8 months ago

KaushikBhalara commented 8 months ago

Steps to create basic project in React through CLI

KaushikBhalara commented 8 months ago

To create react app there are 2 ways.

  1. Through npm
    • npm init react-app firstapp
      1. Through npx
    • npx create-react-app firstapp

To Run react app

KaushikBhalara commented 8 months ago

here project names can not contains captial letters

KaushikBhalara commented 8 months ago

Steps to create project with Vite:

  1. npm create vite ---------> this command will ask for template select react and then ask for project name give project name and then it select javascript as variant.

  2. npm i eslint vite-plugin-eslint eslint-config-react-app --save-dev

  3. create file named .eslintrc.json

    add code

    extends: { "react-app", }

  4. go to vite config import eslint from "vite-plugin-eslint"; export default defineConfig({ plugins: [react(), eslint()], });