Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 5b0a907

Browse files
authored
docs: update readme
1 parent b7e5797 commit 5b0a907

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,12 @@ basic understanding of how the
4545
[React Hooks](https://reactjs.org/docs/hooks-overview.html) work.
4646

4747
```jsx
48-
import { useState } from 'react';
4948
import { usePopper } from 'react-popper';
5049

5150
const Example = () => {
52-
const [referenceElement, setReferenceElement] = useState(null);
53-
const [popperElement, setPopperElement] = useState(null);
54-
const [arrowElement, setArrowElement] = useState(null);
51+
const [referenceElement, setReferenceElement] = React.useState(null);
52+
const [popperElement, setPopperElement] = React.useState(null);
53+
const [arrowElement, setArrowElement] = React.useState(null);
5554
const { styles, attributes } = usePopper(referenceElement, popperElement, {
5655
modifiers: [{ name: 'arrow', options: { element: arrowElement } }],
5756
});

0 commit comments

Comments
 (0)