Releases: bloczjs/react-responsive
Releases · bloczjs/react-responsive
v5.1.0
What's Changed
Deprecations, will be removed in the next major
MediaRangesProviderandMediaRangesContext— usecreateMediaRangesinstead (#187)- The
asprop on the top-levelOnly(#187) — wrap children in the element you need, or usecreateMediaRanges'sOnly - The "breakpoint"-named aliases kept for backward compatibility after the rename (#181):
- exports:
useBreakpoint,BreakpointsProvider,BreakpointsContext - props on
BreakpointsProvider:breakpoints,additionalBreakpoints
- exports:
Customer facing
- Add
createMediaRanges+DEFAULT_MEDIA_RANGES, a strongly-typed alternative toMediaRangesProvider(#187)createMediaRanges(ranges)returns a{ useMediaRange, Only }pair bound to the ranges you pass in — no React context, noadditionalMediaRangesvsmediaRangessplit- The returned
useMediaRange/Onlyvalidate theonstring end-to-end: every space-separated token must match a declared range or its auto-generatedUp/Downalias. Invalid input surfaces a readable TypeScript error likeInvalid media ranges: foo barinstead ofnever - The returned
Onlyonly forwardschildren—asand arbitrary forwarded props are not supported; wrap your children in whatever element you need - Spread
DEFAULT_MEDIA_RANGESwhen you want to keep the defaults (xs,sm,md,lg,xl)
- Rename "breakpoint" to "media range" across the library, tests and documentation to better reflect that each name describes a range between two breakpoints rather than a single breakpoint (#181)
- New exports:
useMediaRange,MediaRangesProvider,MediaRangesContext - New props on
MediaRangesProvider:mediaRanges,additionalMediaRanges - Previous exports are kept but deprecated
- New exports:
Internal
- Migrate from yarn to pnpm (#200)
- Replace eslint & prettier by oxlint & oxfmt (#197)
- Replace jest & jest-dom & puppeteer & parcel with vite + vitest + playwright (#201 & #203)
- Update
README.md(#207)
Full Changelog: v5.0.0...v5.1.0
v5.1.0-alpha.0
What's Changed
Deprecations, will be removed in the next major
MediaRangesProviderandMediaRangesContext— usecreateMediaRangesinstead (#187)- The
asprop on the top-levelOnly(#187) — wrap children in the element you need, or usecreateMediaRanges'sOnly - The "breakpoint"-named aliases kept for backward compatibility after the rename (#181):
- exports:
useBreakpoint,BreakpointsProvider,BreakpointsContext - props on
BreakpointsProvider:breakpoints,additionalBreakpoints
- exports:
Customer facing
- Add
createMediaRanges+DEFAULT_MEDIA_RANGES, a strongly-typed alternative toMediaRangesProvider(#187)createMediaRanges(ranges)returns a{ useMediaRange, Only }pair bound to the ranges you pass in — no React context, noadditionalMediaRangesvsmediaRangessplit- The returned
useMediaRange/Onlyvalidate theonstring end-to-end: every space-separated token must match a declared range or its auto-generatedUp/Downalias. Invalid input surfaces a readable TypeScript error likeInvalid media ranges: foo barinstead ofnever - The returned
Onlyonly forwardschildren—asand arbitrary forwarded props are not supported; wrap your children in whatever element you need - Spread
DEFAULT_MEDIA_RANGESwhen you want to keep the defaults (xs,sm,md,lg,xl)
- Rename "breakpoint" to "media range" across the library, tests and documentation to better reflect that each name describes a range between two breakpoints rather than a single breakpoint (#181)
- New exports:
useMediaRange,MediaRangesProvider,MediaRangesContext - New props on
MediaRangesProvider:mediaRanges,additionalMediaRanges - Previous exports are kept but deprecated
- New exports:
Internal
- Migrate from yarn to pnpm (#200)
- Replace eslint & prettier by oxlint & oxfmt (#197)
- Replace jest & jest-dom & puppeteer & parcel with vite + vitest + playwright (#201 & #203)
Full Changelog: v5.0.0...v5.1.0-alpha.0
v5.0.0
What's Changed
- Switch
useMediaQuerytouseSyncExternalStoreto fix crashes in React 19 caused by re-renders on mount when there are many components [customer-facing] (#171, tests in #172)
If you are on React 16.8+ / React 17, you'll need to use use-sync-external-store to polyfilluseSyncExternalStoreadded in React 18 (so breaking change).- Add
getServerSnapshotto fix crashes on Node (#174)
- Add
- Migrate build system from
microbundletotsdown[internal, may impact devs] (#144) - Update TypeScript config [internal]
- Other internal dev / tests changes [internal]
- Update
mock-match-mediato v1 (#95) - Bump
typescriptfrom 5.7.2 to 5.9.3 (#120) - Bump
eslintfrom 10.2.1 to 10.4.0 (#145, #167) - Bump
@eslint-react/eslint-pluginfrom 1.18.0 to 5.7.10 (#119, #146, #154, #170) - Bump
@typescript-eslint/parserfrom 8.18.0 to 8.58.0 and typescript-eslint group bumps (#117, #131, #150, #153, #166, #149) - Bump
jest-environment-jsdomfrom 29.7.0 to 30.4.1 + manual Jest update (#125, #156, #164) - Bump
ts-jestfrom 29.2.5 to 29.4.6 (#116) - Bump
jest-puppeteerfrom 10.1.4 to 11.0.0 (#118) - Bump
puppeteerfrom 24.42.0 to 25.0.2 (#160, #169) - Bump
@testing-library/domfrom 10.4.0 to 10.4.1 (#128) - Bump
parcelfrom 2.13.2 to 2.16.4 (#130) - Bump
tsdownfrom 0.21.10 to 0.22.0 (#161) - Bump
@types/nodefrom 25.6.0 to 25.8.0 (#157, #168) - Bump
wsfrom 8.20.0 to 8.20.1 (#173) - Bump
actions/setup-nodefrom 3 to 6,actions/checkoutfrom 3 to 6 (#114, #115) - Add Node.js 24.x and 25.x and 26.x to the CI matrix (#113, #163, (#165))
- Add Dependabot configuration (npm, GitHub Actions, React and typescript-eslint groups) (#112, #149, #158)
- Update
Full Changelog: v4.0.0...v5.0.0
v4.0.2 – unpublished
What's Changed
- Bugfix: [useMediaQuery] add getServerSnapshot – fix SSR by @Ayc0 in #174
- internal changes:
- Bump ws from 8.20.0 to 8.20.1 by @dependabot[bot] in #173
- Add Node.js version 26.x to workflow matrix by @Ayc0 in #165
Full Changelog: v4.0.1...v4.0.2
v4.0.1 – unpublished
What's Changed
- Switch
useMediaQuerytouseSyncExternalStoreto fix crashes in React 19 caused by re-renders on mount when there are many components [customer-facing] (#171, tests in #172)
If you are on React 16.8+ / React 17, you'll need to useuse-sync-external-storeto polyfilluseSyncExternalStoreadded in React 18 - Migrate build system from
microbundletotsdown[internal, may impact devs] (#144) - Update TypeScript config [internal]
- Other internal dev / tests changes [internal]
- Update
mock-match-mediato v1 (#95) - Bump
typescriptfrom 5.7.2 to 5.9.3 (#120) - Bump
eslintfrom 10.2.1 to 10.4.0 (#145, #167) - Bump
@eslint-react/eslint-pluginfrom 1.18.0 to 5.7.10 (#119, #146, #154, #170) - Bump
@typescript-eslint/parserfrom 8.18.0 to 8.58.0 and typescript-eslint group bumps (#117, #131, #150, #153, #166, #149) - Bump
jest-environment-jsdomfrom 29.7.0 to 30.4.1 + manual Jest update (#125, #156, #164) - Bump
ts-jestfrom 29.2.5 to 29.4.6 (#116) - Bump
jest-puppeteerfrom 10.1.4 to 11.0.0 (#118) - Bump
puppeteerfrom 24.42.0 to 25.0.2 (#160, #169) - Bump
@testing-library/domfrom 10.4.0 to 10.4.1 (#128) - Bump
parcelfrom 2.13.2 to 2.16.4 (#130) - Bump
tsdownfrom 0.21.10 to 0.22.0 (#161) - Bump
@types/nodefrom 25.6.0 to 25.8.0 (#157, #168) - Bump
actions/setup-nodefrom 3 to 6,actions/checkoutfrom 3 to 6 (#114, #115) - Add Node.js 24.x and 25.x to the CI matrix (#113, #163)
- Add Dependabot configuration (npm, GitHub Actions, React and typescript-eslint groups) (#112, #149, #158)
- Update
Full Changelog: v4.0.0...v4.0.1
v4.0.0
What's Changed
See https://ayc0.github.io/posts/others/blocz-react-responsive-v4 for the blog post.
- Remove
<Match>by @Ayc0 in #67 BREAKING CHANGE - Drop
toJSON&toCSSby @Ayc0 in #84 BREAKING CHANGE - update react to v19 by @Ayc0 in #83
Other small updates
- Bump word-wrap from 1.2.3 to 1.2.4 by @dependabot in #66
- Bump semver from 5.7.1 to 5.7.2 by @dependabot in #65
- Bump tough-cookie from 4.0.0 to 4.1.3 by @dependabot in #64
- Bump postcss from 8.4.14 to 8.4.31 by @dependabot in #68
- Bump @babel/traverse from 7.18.2 to 7.23.2 by @dependabot in #69
- Bump msgpackr from 1.6.1 to 1.10.1 by @dependabot in #70
- Bump follow-redirects from 1.15.1 to 1.15.4 by @dependabot in #71
- Bump ip from 1.1.8 to 1.1.9 by @dependabot in #72
- Bump follow-redirects from 1.15.4 to 1.15.6 by @dependabot in #73
- Bump ejs from 3.1.8 to 3.1.10 by @dependabot in #75
- Bump tar from 6.1.11 to 6.2.1 by @dependabot in #74
- Bump braces from 3.0.2 to 3.0.3 by @dependabot in #76
- Bump loader-utils from 3.2.0 to 3.3.1 by @dependabot in #77
- Bump micromatch from 4.0.5 to 4.0.8 by @dependabot in #78
- Bump rollup from 2.75.5 to 2.79.2 by @dependabot in #79
- Bump cross-spawn from 7.0.3 to 7.0.6 by @dependabot in #80
- use
@eslint-react/eslint-plugininstead ofeslint-plugin-reactby @Ayc0 in #85 - Update ESLint to v9 & flat config by @Ayc0 in #86
- Enable
isolatedDeclarationsby @Ayc0 in #87 - update tooling by @Ayc0 in #82
- update node in the CI by @Ayc0 in #81
Full Changelog: v3.0.3...v4.0.0-beta.0
v4.0.0-beta.1
v4.0.0-beta.0
What's Changed
- update node in the CI by @Ayc0 in #81
- Remove
<Match>by @Ayc0 in #67 BREAKING CHANGE - update tooling by @Ayc0 in #82
- update react to v19 by @Ayc0 in #83
Other small updates
- Bump word-wrap from 1.2.3 to 1.2.4 by @dependabot in #66
- Bump semver from 5.7.1 to 5.7.2 by @dependabot in #65
- Bump tough-cookie from 4.0.0 to 4.1.3 by @dependabot in #64
- Bump postcss from 8.4.14 to 8.4.31 by @dependabot in #68
- Bump @babel/traverse from 7.18.2 to 7.23.2 by @dependabot in #69
- Bump msgpackr from 1.6.1 to 1.10.1 by @dependabot in #70
- Bump follow-redirects from 1.15.1 to 1.15.4 by @dependabot in #71
- Bump ip from 1.1.8 to 1.1.9 by @dependabot in #72
- Bump follow-redirects from 1.15.4 to 1.15.6 by @dependabot in #73
- Bump ejs from 3.1.8 to 3.1.10 by @dependabot in #75
- Bump tar from 6.1.11 to 6.2.1 by @dependabot in #74
- Bump braces from 3.0.2 to 3.0.3 by @dependabot in #76
- Bump loader-utils from 3.2.0 to 3.3.1 by @dependabot in #77
- Bump micromatch from 4.0.5 to 4.0.8 by @dependabot in #78
- Bump rollup from 2.75.5 to 2.79.2 by @dependabot in #79
- Bump cross-spawn from 7.0.3 to 7.0.6 by @dependabot in #80
Full Changelog: v3.0.3...v4.0.0-beta.0
v3.0.3
What's Changed
Exposed changes:
- Add types in exports by @Ayc0 in #60
- [react 18] mark as available by @Ayc0 in #44
- [react][types] update to v18 by @Ayc0 in #49
Internal changes:
- Bump hosted-git-info from 2.8.4 to 2.8.9 by @dependabot in #41
- Bump url-parse from 1.4.7 to 1.5.1 by @dependabot in #40
- Bump dns-packet from 1.3.1 to 1.3.4 by @dependabot in #42
- Bump ws from 6.2.1 to 6.2.2 by @dependabot in #43
- Upgrade to Yarn 3 by @Ayc0 in #47
- update mock match media by @Ayc0 in #48
- [gh action] run on node 14 16 18 by @Ayc0 in #50
- [gh action] drop node 14 and use new JSON import syntax by @Ayc0 in #51
- [parcel] use parcel instead of CRA by @Ayc0 in #52
- update actions/checkout & actions/setup-node by @Ayc0 in #53
- [packages] update all by @Ayc0 in #54
- update more packages by @Ayc0 in #55
- Bump json5 from 1.0.1 to 1.0.2 by @dependabot in #57
Full Changelog: v3.0.2...v3.0.3
v3.0.2
- Better fix
onlyandmatchMediaprops on DOM elements for theMatchcomponent- With the implementation of the v3.0.0, we were polluting the global scope, injecting the variable
Reacteverywhere. This version ships a better fix for both of them.
- With the implementation of the v3.0.0, we were polluting the global scope, injecting the variable
- Add support for node 15 and 16