Skip to the content.

Home Page

Class 04 Notes

React Docs - Forms

A controlled component is an element whose value is controlled by React. We should wait to store the form’s information in state to keep the component controlled. All you need to do is use an event handler and check the specific state value.

Conditional (Terinary) Operator Explained

We could use a terinary operator to make two checks at once and reduce the amount of if/else statements. We can also do this with an ‘!’ but its harder to wrap your head aroound.


x === y ? 'true' : 'false';

Things I want to know more about