Skip to content

Commit 9396262

Browse files
committed
Cosmetics.
1 parent 6f4a0c5 commit 9396262

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,8 @@ const UserScrollTracker = () => {
315315

316316
Returns the user's language setting from [`navigator.language`](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/language). Use the `defaultLang` of the options parameter to set a default language. _(default: `'en`)_.
317317

318+
##### Example <a name="useLangExample"></a>
319+
318320
```javascript
319321
import React from 'react';
320322
import { useLang } from '@haensl/react-hooks';
@@ -328,8 +330,6 @@ const MyComponent = () => {
328330
};
329331
```
330332
331-
##### Example <a name="useLangExample"></a>
332-
333333
### `useOnScroll(fn, [el = window])` <a name="useOnScroll"></a>
334334
335335
Subscribes to [`scroll`](https://developer.mozilla.org/en-US/docs/Web/API/Element/scroll_event) events on the given element `el` _(default: `window`)_. The callback function `fn` is passed the [`Event`](https://developer.mozilla.org/en-US/docs/Web/API/Element/scroll_event). Please check the [example below](#useOnScrollExample) as well as the [Codepen example](https://codepen.io/haensl/pen/wvMoLJK).

0 commit comments

Comments
 (0)