Nima Boscarino
What is React anyways?
-
It's a javascript framework for UI design
-
what is a framework???
- like a library
- library???
- things that you can take and use that are already built for you
- Express
- jQuery
- http
npm i lotide
-
let's talk about UI design, why do we need a framework???
- Button
- Text
- Inputs
- Checkboxes
- Navigation
-
How to understand or learn a framework??
- FOCUS ON THE GIMMICK!! (gimmick === abstaction)
-
What is the gimmick in Express???
- creating a server and setting up routes
- setting up routes, how do we do it??
app.get(URL, handler)
app.post()
MIDDLEWARE
- generic middleware app.use
-
What is the gimmick in jQuery?
- selector ($(....))
-
What is REACT'S major abstraction/gimmick?
- COMPONENTS!
- react only re-renders the components that it needs to instead of rerendering the whole DOM
Create a new react app:
npx create-react-app NAME
cd NAME
npm start
Export: why export default???