React.js Notes
373 subscribers
72 photos
4 files
48 links
Welcome :)
Public React Notes
Download Telegram
we can use CodeSandbox in internship time
with two ways
- react.new
- https://codesandbox.io/
Note:
- Components in React is really just a function
- Functions in React, can return somthing called JSX (jsxml)
W we can create functions before "return" in component function, to use it with JSX => like function to fetch api
App.js => component
first component
index.js
Basic file, cauze it linked in index.html
App.js => component
we can create getDataAdvice function here
const [advice, setAdvice] = useState("")
counter, increase while call the function (click the button)
useEffect()
take two arguments
1 - function, that we want to get executed
2 - called the dependency array
useState()
work with array destructuring
take two variables
2 - setExample, take data from function (e.g data from api) and put data in example (first variable), to can we use example in any other function

1 - example, take data from setExample
and use it in any place (e.g function, JSX, ...)
step-1
step-2
Note:
we can create other component function
and use it in other component
like this, other component, and i use it in App component
=> props is Object
=> count now is property
Useful Resources for Part 1
Here are some resources that you might find helpful while studying this Part 1.

👉 https://react.dev/?ref=jonas.io (Documentation that you should keep open at all times)

👉 https://create-react-app.dev/?ref=jonas.io (This is how we'll setup our first app)

👉 https://vitejs.dev/guide/?ref=jonas.io (For real-world React apps)

👉https://gist.githubusercontent.com/gaearon/0275b1e1518599bbeafcde4722e79ed1/raw/db72dcbf3384ee1708c4a07d3be79860db04bff0/example.html (For the "Pure React" lecture)
Start day-2 ⚛️⚛️
Rise of SPA