How to create a new React app

Setting up a new React application efficiently is crucial for modern web development with proper tooling, build optimization, and development experience. As the creator of CoreUI, a widely used open-source UI library, I’ve created countless React applications and integrated CoreUI with various React setups for enterprise dashboards and user interfaces. From my expertise, the most modern approach is to use Vite for new projects due to its superior performance and developer experience. This method provides lightning-fast development server, optimized builds, and excellent support for modern JavaScript features and TypeScript.

Use Vite to create modern React applications with superior performance and developer experience.

npm create vite@latest my-react-app -- --template react
cd my-react-app
npm install
npm run dev

Vite creates React applications with modern tooling including fast Hot Module Replacement (HMR), optimized builds, and native ES modules support. The --template react flag sets up a React project with JavaScript, or use --template react-ts for TypeScript. Vite provides instant server startup, faster builds than webpack-based solutions, and excellent developer experience. After creation, navigate to the project directory, install dependencies, and start the development server with npm run dev for immediate development.

Best Practice Note:

This is the same approach we use for new CoreUI React projects to leverage modern development tools and optimal performance. For existing projects or team preferences, create-react-app is still viable: npx create-react-app my-app, but Vite is recommended for new projects due to significantly faster development builds and modern tooling.


Speed up your responsive apps and websites with fully-featured, ready-to-use open-source admin panel templates—free to use and built for efficiency.


About the Author