install hook reactjs code example Example: react hook install npm i -S react@16.7.0-alpha.2 react-dom@16.7.0-alpha.2