- setState() method: In this case, the parent component will call the setState() method in the child component, which will trigger an update of its state. The parent component will then re-render itself with the updated state.
- props() method: This approach is similar to using setState(), but it differs in that it does not trigger re-rendering of the parent component. Instead, it passes down props() values from the parent to child components.
Share a personalized message with your friends.