クラスコンポーネント | 関数コンポーネント |
---|---|
constructor(props) |
関数コンポーネントの引数をprops として受け取る |
render() |
関数コンポーネントの返り値 |
componentDidMount() |
useEffect(() => {...}) |
componentDidUpdate() |
useEffect(() => {...}, [...]) |
componentWillUnmount() |
useEffect(() => {return () => {...}}) |
this.state = {...} |
const [v, setV] = useState(initV) |
this.setState({...}) |
上行 + setV(...) |
Created
April 18, 2022 07:43
-
-
Save eggplants/a2039782cd1846e0620be183a6497788 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment