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

Commit 38b8109

Browse files
authored
docs: fix legacy details
1 parent d492c0a commit 38b8109

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Via `script` tag (UMD library exposed as `ReactPopper`):
4040
4141
`react-popper` provides two different APIs to help consume it:
4242

43-
### React Hooks
43+
### 1. React Hooks (recommended)
4444

4545
The `usePopper` hook can be used to quickly initialize a Popper, it requires a
4646
basic understanding of how the
@@ -72,9 +72,9 @@ const Example = () => {
7272
};
7373
```
7474

75-
### Render Props
75+
### 2. Render Props (legacy)
7676

77-
This is a legacy API for compatbility with v1.x users moving to Popper v2. We recommend using the Hook in new code.
77+
This is a legacy API for compatibility with v1.x users moving to Popper v2. We recommend using the `usePopper` Hook in new code.
7878

7979
<details>
8080
<summary>View details</summary>
@@ -112,7 +112,7 @@ const Example = () => (
112112

113113
## API documentation
114114

115-
### Hooks
115+
### `usePopper`
116116

117117
The `usePopper` hook provides an API almost identical to the ones of
118118
[`createPopper`](https://popper.js.org/docs/v2/constructors/#createpopper)
@@ -159,7 +159,7 @@ has been destroyed.
159159

160160
### Render Props
161161

162-
This is a legacy API for compatbility with v1.x users moving to Popper v2. We recommend using the Hook in new code.
162+
This is a legacy API for compatibility with v1.x users moving to Popper v2. We recommend using the `usePopper` Hook in new code.
163163

164164
<details>
165165
<summary>View details</summary>
@@ -280,7 +280,7 @@ React 16 alternative) to move the popper component somewhere else in the DOM.
280280
This can be useful if you want to position a tooltip inside an
281281
`overflow: hidden` container that you want to make overflow.
282282
283-
**Please note that you can also try `strategy="fixed"` to obtain a similar
283+
**Please note that you can also try `strategy: 'fixed'` to obtain a similar
284284
effect with less hassle.**
285285
286286
```jsx

0 commit comments

Comments
 (0)