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” });
3 years 2021-08-03T17:55:16+00:00 5 views 0

Leave an answer

Browse
Browse