1×
Become a member
to unlock all features
Autoplay

    Handle componentDidMount and componentWillUnmount in React Component Refactor to Hooks

    reactReact
    ^16.7.0-alpha

    Let's refactor our GitHubClientProvider class component to a function component that uses hooks. This one's pretty interesting because we can use useEffect to encapsulate everything we need for a single effect, truly separating that concern within our component.