if we want to start the project
in Terminal
You can open package.json
and look to scripts
in Terminal
npm run start
or npm start
You can open package.json
and look to scripts
Before learn React
You should be more aware of these things about JS
- ternaries, spread operator, template syntax, destructuring array / object, map, filter, reduce, sort, promises, async / await
You should be more aware of these things about JS
- ternaries, spread operator, template syntax, destructuring array / object, map, filter, reduce, sort, promises, async / await
- in src folder, contain first file => called
- We called index.js, cauze
=> webpack is module bundler, uses in "create-react-app"
- index.js contain two libraries (React, ReactDOM)
`import React from "react";
import ReactDOM from "react-dom/client";`
=> Render the root component, lik this
function App() {
return ( <h1> Hello </h1> )
}
// from React-18
// and this in index.js file
const root = ReactDOM.createRoot(document.getElementById("root"))
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);
index.js
- We called index.js, cauze
webpack
=> webpack is module bundler, uses in "create-react-app"
- index.js contain two libraries (React, ReactDOM)
`import React from "react";
import ReactDOM from "react-dom/client";`
=> Render the root component, lik this
function App() {
return ( <h1> Hello </h1> )
}
// from React-18
// and this in index.js file
const root = ReactDOM.createRoot(document.getElementById("root"))
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);
... Components in React
- React applications are entirely made out of
components
- Building blocks of user interfaces in React
- Piece of UI that has its own data, logic,
and appearance (how it works and looks)
- We build complex UIs by building multiple
components and combining them
- Components can be reused, nested inside
each other, and pass data between them
- React applications are entirely made out of
components
- Building blocks of user interfaces in React
- Piece of UI that has its own data, logic,
and appearance (how it works and looks)
- We build complex UIs by building multiple
components and combining them
- Components can be reused, nested inside
each other, and pass data between them
Styles => style={{}}
We can write styles inline
or external. but must import "index.css"
class => called className=" "
We can write styles inline
or external. but must import "index.css"
class => called className=" "
https://downloadly.ir/elearning/video-tutorials/nodejs-express-mongodb-bootcamp-5/
Udemy – Node.js، Express، MongoDB & More: The Bootcamp 2023 2023-6
https://t.me/ReactbyJonas
كورس ريأكت كامل
Udemy – Node.js، Express، MongoDB & More: The Bootcamp 2023 2023-6
https://t.me/ReactbyJonas
كورس ريأكت كامل