Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
クラスコンポーネント 関数コンポーネント
constructor(props) 関数コンポーネントの引数をpropsとして受け取る
render() 関数コンポーネントの返り値
componentDidMount() useEffect(() => {...})
componentDidUpdate() useEffect(() => {...}, [...])
componentWillUnmount() useEffect(() => {return () => {...}})
this.state = {...} const [v, setV] = useState(initV)
this.setState({...}) 上行 + setV(...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment