Skip to content

Commit

Permalink
Add import statements for hooks-example in README (facebookarchive#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: facebookarchive#2075

Differential Revision: D15415655

Pulled By: claudiopro

fbshipit-source-id: 64c5b766e381269ebf441ac98b79260354f1d198
  • Loading branch information
bennettdams authored and mmissey committed Mar 24, 2020
1 parent 01e05bf commit ab74074
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 ab74074

Please sign in to comment.