Skip to content

Releases: bloczjs/react-responsive

v4.0.1

19 May 09:12
v4.0.1
dff51ea

Choose a tag to compare

What's Changed

  • Switch useMediaQuery to useSyncExternalStore to fix crashes in React 19 caused by re-renders on mount when there are many components [customer-facing] (#171, tests in #172)
  • Migrate build system from microbundle to tsdown [internal, may impact devs] (#144)
  • Update TypeScript config [internal]
    • Change TypeScript target from ES5 to ESNext (#135)
    • Change moduleResolution from node to bundler (#134)
    • Add rootDir to tsconfig.json (#133)
  • Other internal dev / tests changes [internal]
    • Update mock-match-media to v1 (#95)
    • Bump typescript from 5.7.2 to 5.9.3 (#120)
    • Bump eslint from 10.2.1 to 10.4.0 (#145, #167)
    • Bump @eslint-react/eslint-plugin from 1.18.0 to 5.7.10 (#119, #146, #154, #170)
    • Bump @typescript-eslint/parser from 8.18.0 to 8.58.0 and typescript-eslint group bumps (#117, #131, #150, #153, #166, #149)
    • Bump jest-environment-jsdom from 29.7.0 to 30.4.1 + manual Jest update (#125, #156, #164)
    • Bump ts-jest from 29.2.5 to 29.4.6 (#116)
    • Bump jest-puppeteer from 10.1.4 to 11.0.0 (#118)
    • Bump puppeteer from 24.42.0 to 25.0.2 (#160, #169)
    • Bump @testing-library/dom from 10.4.0 to 10.4.1 (#128)
    • Bump parcel from 2.13.2 to 2.16.4 (#130)
    • Bump tsdown from 0.21.10 to 0.22.0 (#161)
    • Bump @types/node from 25.6.0 to 25.8.0 (#157, #168)
    • Bump actions/setup-node from 3 to 6, actions/checkout from 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)

Full Changelog: v4.0.0...v4.0.1

v4.0.0

01 Jan 21:08

Choose a tag to compare

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 & toCSS by @Ayc0 in #84 BREAKING CHANGE
  • update react to v19 by @Ayc0 in #83

Other small updates

Full Changelog: v3.0.3...v4.0.0-beta.0

v4.0.0-beta.1

09 Dec 23:08

Choose a tag to compare

v4.0.0-beta.1 Pre-release
Pre-release

What's Changed

  • Drop toJSON & toCSS by @Ayc0 in #84 BREAKING CHANGE
  • use @eslint-react/eslint-plugin instead of eslint-plugin-react by @Ayc0 in #85
  • Update ESLint to v9 & flat config by @Ayc0 in #86
  • Enable isolatedDeclarations by @Ayc0 in #87

Full Changelog: v4.0.0-beta.0...v4.0.0-beta.1

v4.0.0-beta.0

09 Dec 19:44

Choose a tag to compare

v4.0.0-beta.0 Pre-release
Pre-release

What's Changed

Other small updates

Full Changelog: v3.0.3...v4.0.0-beta.0

v3.0.3

20 Mar 14:15

Choose a tag to compare

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:

Full Changelog: v3.0.2...v3.0.3

v3.0.2

22 Apr 21:13

Choose a tag to compare

  • Better fix only and matchMedia props on DOM elements for the Match component
    • With the implementation of the v3.0.0, we were polluting the global scope, injecting the variable React everywhere. This version ships a better fix for both of them.
  • Add support for node 15 and 16

v3.0.1

09 Apr 12:16

Choose a tag to compare

3.0.1

  • Fix exports field in package.json
    • use correct lib/ folder instead of dist/
    • Use proper .mjs for node
  • Drop support for node 13

v3.0.0

12 Mar 13:15

Choose a tag to compare

  • The package was renamed @blocz/react-responsive instead of react-only
  • rename useOnly to useBreakpoint and useQuery to useMediaQuery BREAKING CHANGE
    • Those were renamed for 2 reasons:
      1. useOnly isn’t really explicit
      2. useQuery can be confused with react-query’s or apollo’s useQuery hooks
  • useBreakpoint and useMediaQuery stop returning undefined during the initialization and if the media query is invalid. Instead it will directly use the correct value, and if the media query is invalid, it’ll return false. BREAKING CHANGE
  • Bump peerDependencies to allow for react 17
  • Drop support for node 10
  • Remove prop strict BREAKING CHANGE:
    • This feature was initially introduced to avoid collision between mdUp and smDown for instance. But since we avoid the overlapping of breakpoints in the v1.0.1 and as this is customizable, this prop doesn't make sense anymore.
    • This prop relied on calc(% + 1px) and calc(% - 1px) which has 2 issues:
      • difficult to be compatible with SSR as for instance css-mediaquery crashes when we use calc() (see issue),
      • 1px is really arbitrary and not customizable so anyway if someone wanted to change that, they had to use custom breakpoints.
  • Fix only and matchMedia props on DOM elements for the Match component
    • Inject MatchChildProps in HTMLAttributes from the global namespace React

v2.3.3

02 May 18:26

Choose a tag to compare

  • remove wrong dependency on emotion

v2.3.2

02 May 18:27

Choose a tag to compare

  • add toJSON and toCSS for CSS-in-JS support