View on GitHub

reading-notes

React and Forms

What is a ‘Controlled Component’?

It’s one that takes its current value through props and notifies changes through callbacks like onChange. A parent component “controls” it by handling the callback and managing its own state and passing the new values as props to the controlled component.

 

Update the state with their responses as soon as they enter them, because that allows us to keep the data for the user if they close the page by mistake or something similar.

 

by calling a function each time this changes.

 

if we want a quick way to choose between two options.

 

if(x===y){
 console.log(true);
} else {
 console.log(false);
}

you do that through:

let o = x===y ? true : false;
console.log(o);





301 Home
read01 Introduction to React and Components
read02 State and Props
read03 Passing Functions as Props
read04 React and Forms
read05 Putting it all together
read06 NODE.JS
read07 REST
read08 APIs
read09 FUNCTIONAL PROGRAMMING
read10 In memory storage
read11 Authentication
read12 Mongo and Mongoose
read13 CRUD
read14 Project Ideas
read15 Project Kickoff