card background pattern
Level 2

Custom React Hooks

Unlock Full Course

$49.99 $24.99



A Basic Toggle Hook

We will start off looking at hooks by making a basic toggle using React hooks. We will use the useState hook to accomplish this.



updated 3 days ago

@fpigeonjr Font is MonoLisa and theme Synthwave 84

3 months ago

Scott, what font and theme are you using? Looks great!

4 months ago

@Daniel The intention is to avoid potential bugs when introducing async functionality into the component. Here's a section in the FAQs that gives an example of this:

4 months ago

do you have a link to the recommendation of prevState over the state variable? i couldn't find it in the react docs where they just use the regular state variable

Ryan C. Perry
4 months ago

In the same VSCode package, RAFCE does the same thing with the default export at the bottom.

Something to say?

Become a Pro