Reactjs Quiz: Events & State

React Native

Results

#1. How should you NOT listen to events when working with React?

#2. Which value should you pass to event listener props like onClick?

#3. How can you communicate from one of your components to a parent (i.e. higher level) component?

#4. How can you change what a component displays on the screen?

#5. Why do you need this extra "state" concept instead of regular JS variables which you change and use?

#6. Which statement about "useState" is NOT correct?

#7. How can you update component state (created via useState)?

#8. How much state may you manage in one single component?

Next

#9. What's wrong about this code snippet? const [counter, setCounter] = useState(1); ... setCounter(counter + 1);

#10. What does this code snippet do? someArray.map((element) =>

{element}

)

#11. Why should you add the special "key" prop to list JSX elements?

#12. What's true about outputting conditional content in React components?

Finish

Leave a Reply

Your email address will not be published. Required fields are marked *