Quiz

This quiz will test your knowledge on creating strongly-typed function component state.

Creating strongly-typed function component state

1

What is the inferred type for the name state from the useState hook?

const [name, setName] = React.useState("");
A)

any

B)

string

C)

unknown

Question 1 of 50 attempted

Get hands-on with 1400+ tech skills courses.