getDerivedStateFromProps
React.Component – React
hook React
で
どうすれば getDerivedStateFromProps を実装できますか? フックに関するよくある質問 – React