Skip to content

Commit 20640ea

Browse files
committed
Merge branch 'main' into typescript
2 parents 78d6269 + 3056aa2 commit 20640ea

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<h1 align="center">React Breakpoints</h1>
66

77
<p align="center">
8-
<img alt="dependent repositories" src="https://img.shields.io/librariesio/dependent-repos/npm/@envato/react-breakpoints?label=Used%20by&style=for-the-badge" />
98
<img alt="npm version" src="https://img.shields.io/npm/v/@envato/react-breakpoints?style=for-the-badge" />
109
<img alt="react version" src="https://img.shields.io/npm/dependency-version/@envato/react-breakpoints/peer/react?style=for-the-badge">
1110
<img alt="license" src="https://img.shields.io/npm/l/@envato/react-breakpoints?style=for-the-badge" />
@@ -97,6 +96,12 @@ Using [`useResizeObserver()`](/docs/api.md#useresizeobserver), [`useResizeObserv
9796

9897
In some cases, you may want to optimise this. If you only want to re-render your components when the returned breakpoint values actually change, use `React.useMemo` or `React.memo`.
9998

99+
# Re-rendering
100+
101+
Using [`useResizeObserver()`](/docs/api.md#useresizeobserver), [`useResizeObserverEntry()`](/docs/api.md#useresizeobserverentry) or [`useBreakpoints()`](/docs/api.md#usebreakpoints) in your components causes them to re-render **every time a resize is observed**.
102+
103+
In some cases, you may want to optimise this. If you only want to re-render your components when breakpoint values actually change, use `React.useMemo` or `React.memo`.
104+
100105
# Server-Side Rendering
101106

102107
See [Server-Side Rendering](/docs/server-side-rendering.md) for more information.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@envato/react-breakpoints",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "Respond to changes in a DOM element's size. With React Breakpoints, element queries are no longer \"web design's unicorn\" 🦄",
55
"main": "dist/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)