A javascript library used for building user interfaces.
"Write Programs that do one thing and do it well" - Doug Mcllory
"Write Programs that do one thing and do it well" - Doug Mcllory
Why we need components - reusability
useState is a react function that is used to get the state. It is called a Hook in react world.
useState() returns 2 objects
(1) state object
(2) function to update the state object.
The state in a react component can be accessed by only that component and non one else.
props can hold data and functions.
Responsibility Isolation:
eventHandler
React allows us to write HTML, they are called JSX or javascript extensions. JSX compiles to react api calls.
babel is the compiler that compiles JSX to react api calls.
A Pure component is a component that does n't have a state.
Component in React should start with uppercase.
OneWay flow of data - Parent component can flow the data to its children.
JSX - supports dynamic expressions if used within curly braces
REact DOM
Components
state
Javascript
1. Arrow functions does n't care about as to who calls it but regular function does
2. Use let and const for variables
Everything in javascript is an object including functions.
create-react-app : Helps us to create a local react development environment with a single command.
No comments:
Post a Comment