Skip to content

Commit

Permalink
docs: fix some typos and namings
Browse files Browse the repository at this point in the history
  • Loading branch information
xobotyi committed May 25, 2021
1 parent a43022e commit f83b12f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions stories/Sensor/useMeasure.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import * as React from 'react';
import { useMeasure } from '../../src/useMeasure';

export const Example: React.FC = () => {
const [measure, ref] = useMeasure<HTMLDivElement>();
const [measurements, ref] = useMeasure<HTMLDivElement>();

return (
<div>
<pre>{JSON.stringify(measure)}</pre>
<pre>{JSON.stringify(measurements)}</pre>
<div
ref={ref}
style={{
Expand Down
2 changes: 1 addition & 1 deletion stories/Sensor/useMeasure.story.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Example } from './useMeasure.stories';

Uses ResizeObserver to track element dimensions and re-render component when they change.

- It's ResizeObserver callback uses RAF debouncing, therefore it is pretty performant.
- Its ResizeObserver callback uses RAF debouncing, therefore it is pretty performant.
- SSR friendly, returns `undefined` on initial mount.
- Automatically creates ref for you, that you can easily pass to needed element.

Expand Down

0 comments on commit f83b12f

Please sign in to comment.