Share
Which function is used for updating the state of a component?
Question
- A functional component with the useState hook and a class component with built-in state.
- Function Component = const [size, changeSize] = useState(“You didn’t press any button yet”);
- Class Component = this.setState({ size: “big”, message: “big” });
Leave an answer