From the React Official Documentation I came to know that we have to use React frameworks like Next.js, Remix, Gatsby etc.
Also the create-react-app
is no longer valid if we want to create a React app. ๐
From React's official documentation
You can definitely use React without a frameworkโthatโs how youโd use React for a part of your page. However, if youโre building a new app or a site fully with React, we recommend using a framework.
But as a beginner I want to explore only the React library. That's why I need to install React in my local. To acheive this we can use bundler tools like Vite.
So let's start with the installation. ๐ค๐
Let's first install Node.js. Then Let's scaffold our first Vite project for React.
With NPM:
npm create vite@latest
With Yarn:
yarn create vite
After enter there will be prompt to proceed. Next steps will be:
- Enter Project name: โฆ
myreactapp
- Select a framework: โบ
React
- Select a variant: โบ
JavaScript + SWC
There will be several options to select which Framework/library/Language to select. We can select by moving the arrow keys.
After this the our react application will be created. In this case my React app name is myreactapp
.
Now after all this We just have to
cd myreactapp
npm install
npm run dev
Our react app will be ready and running.
Now let's open the URL http://localhost:5174/
in browser and see our created React app is running.
It is really great how Vite has made the steps really easy to install and scaffold any library. I have became a fan of Vite. I will try to go through the documentation of Vite later. ๐
I will dive into development Application from now on. ๐ค
Thank you for reading ๐ will keep posting on my learning here. Till then bye ๐๐
Top comments (0)