1. 3
    Add state to functional React component with useState hook without introducing a class
    1m 18s

Add state to functional React component with useState hook without introducing a class

InstructorTomasz Łakomy

Share this video with your friends

Send Tweet

Most React developers knows the pain of refactoring a functional component only because we would like to add a state to it.

In this lesson we are going to learn a new way of handling that - React 16.7 alpha introduces a concept of hooks, which allow us to well... hook into existing React features (such as state) from inside of a functional component. By using a useState hook we introduce state to a Counter component without introducing a class.