Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Commit

Permalink
Add import statements for hooks-example in README (#2075)
Browse files Browse the repository at this point in the history
Summary:
**Summary**

The README is missing the import statements for the getting-started-example with hooks.
Pull Request resolved: #2075

Differential Revision: D15415655

Pulled By: claudiopro

fbshipit-source-id: 64c5b766e381269ebf441ac98b79260354f1d198
  • Loading branch information
bennettdams authored and facebook-github-bot committed May 20, 2019
1 parent 634bd29 commit 943f6dc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ Since the release of React 16.8, you can use [Hooks](https://reactjs.org/docs/ho


```js
import React from 'react';
import ReactDOM from 'react-dom';
import {Editor, EditorState} from 'draft-js';

function MyEditor() {
const [editorState, setEditorState] = React.useState(
EditorState.createEmpty()
Expand Down

0 comments on commit 943f6dc

Please sign in to comment.