paint-brush
Understanding the useState hook in React with Basic Usageby@Addo
280 reads

Understanding the useState hook in React with Basic Usage

by Daniel2mNovember 11th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

UseState is a React hook function that allows us to use state and other React features without writing a class. In React every function name begins with "use", for example useOtherName is a hook. “useState” function returns a value and a function to manipulate the state. It is a covention to begin the function name with "set" then followed by the value name (CamelCase) ‘UseState’ can be called with a default value, otherwise the value will return “undefined”
featured image - Understanding the useState hook in React with Basic Usage
Daniel HackerNoon profile picture
Daniel

Daniel

@Addo

Full-Stack Web Developer

About @Addo
LEARN MORE ABOUT @ADDO'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Daniel HackerNoon profile picture
Daniel@Addo
Full-Stack Web Developer

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite