To launch one React project you will need to follow the next steps:
- Clone the code:
git clone git@github.com:CosmeValera/react-learning.git
- Open your terminal and navigate to the root directory:
cd ReactProjects
- Navigate to a project directory (these 3 are
Vite
):
cd learning-react/tenzies/
or
cd learning-react/meme-generator/
or
cd learning-react/notes-app/
- Install the dependencies:
npm i
- Start
Vite
project:
npm run dev
Open http://localhost:5173 to view it in your browser.
Or
- Start
create-react-app
project:
npm start
Open http://localhost:3000 to view it in your browser.
Learned:
- State (
useState
is a hook for handling state in React) - Side Effects (
useEffect
is a hook for handling side effects in React) - Forms
- Event Listeners (onClick, onMouseOver...)
- Fetch and call to API
- Conditional rendering
Learned:
- Props
- Array.map
- Create project from scratch using
Vite
npm create vite@latest
Learned:
- Create React components
- How React DOM works
- Create project from scratch
npx create-react-app my-react-app
- Debouncing effect
- Firebase
- Local Storage
- React Confetti
npm install react-confetti
- Type in the terminal:
npm install standard -D
- Add in the package.json:
"eslintConfig": {
"extends": "./node_modules/standard/eslintrc.json"
}
- To run the lintern, type in the terminal:
npm run lint
To deploy our project we are going to build it first and then drop the /dist files in Netlify
. Here's how:
- Build the project
npm run build
- Open the following URL:
- Drop the dist folder inside the web:
Enjoy your deployed app!! 😀