breakpoint-utils 2.0.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -185,9 +185,9 @@ function ResizablePanel() {
|
|
|
185
185
|
|
|
186
186
|
> **Note:** Use breakpoint hooks (`useUp`, etc.) for responsive layouts. Use `useViewport` only when you need actual pixel values for calculations.
|
|
187
187
|
|
|
188
|
-
## Migrating from
|
|
188
|
+
## Migrating from v2.0.0 and earlier
|
|
189
189
|
|
|
190
|
-
In
|
|
190
|
+
In v2.0.0 and earlier, reactive breakpoint checks required `useViewport()` to trigger re-renders:
|
|
191
191
|
|
|
192
192
|
```typescript
|
|
193
193
|
import { useViewport, up } from 'breakpoint-utils';
|
|
@@ -202,7 +202,7 @@ function MyComponent() {
|
|
|
202
202
|
This still works, but the dedicated hooks are preferred — they only re-render when a breakpoint boundary is crossed:
|
|
203
203
|
|
|
204
204
|
```typescript
|
|
205
|
-
// v2.
|
|
205
|
+
// v2.1.0+ — dedicated hooks
|
|
206
206
|
import { useUp } from 'breakpoint-utils';
|
|
207
207
|
|
|
208
208
|
function MyComponent() {
|