Releases: roderickhsiao/react-in-viewport
v1.0.0-beta-3
What's Changed
- Bump postcss from 8.4.21 to 8.4.38 by @dependabot in #126
- Bump follow-redirects from 1.15.2 to 1.15.6 by @dependabot in #127
- Bump express from 4.18.2 to 4.19.2 by @dependabot in #128
- Bump tar from 6.1.13 to 6.2.1 by @dependabot in #129
- Bump @babel/traverse from 7.21.4 to 7.24.5 by @dependabot in #130
- Bump ws from 8.13.0 to 8.17.1 by @dependabot in #133
- Bump braces from 3.0.2 to 3.0.3 by @dependabot in #132
- Bump ejs from 3.1.9 to 3.1.10 by @dependabot in #131
- Bump webpack from 5.77.0 to 5.94.0 by @dependabot in #135
- Bump micromatch from 4.0.5 to 4.0.8 by @dependabot in #136
- Bump express from 4.19.2 to 4.21.0 by @dependabot in #137
- fix: Address observer not watch for DOM update by @roderickhsiao in #138
Full Changelog: v1.0.0-beta-1...v1.0.0-beta-3
v1.0.0-beta-1
What's Changed
- Bump tough-cookie from 4.1.2 to 4.1.3 by @dependabot in #121
- Bump semver from 5.7.1 to 5.7.2 by @dependabot in #122
- Bump word-wrap from 1.2.3 to 1.2.4 by @dependabot in #123
- Bump react-aspect-ratio to support passing refs by @chrissantamaria in #120
- fix: Remove findDOMNode from libary by @roderickhsiao in #125
Breaking Change Announcement
We are deprecating the use of findDOMNode
due to its removal in React's future releases. This change involves shifting the responsibility of accessing the DOM node directly to the component owner. This update affects our HOC implementations and the way refs are handled in both functional and class-based components.
fix #73
What's Breaking
- HOC Ref Handling: For enhanced compatibility with both functional and class-based components, HOCs will now return a ReactNode instead of a DOMNode. This change means you must use forwardedRef to attach refs directly to the DOM elements within your components.
- Class Component Migration: We recommend migrating away from class-based components when possible due to these changes affecting ref handling.
- Ref Propagation: Both class and functional components must now use forwardedRef to directly attach refs to the HTML DOM elements to ensure proper registration.
- Hook Update: The useInViewport hook now requires a DOM node to be passed explicitly.
Migration Guide
To adapt to these changes, you'll need to update how refs are passed and used within your components. Below are the examples illustrating the necessary updates:
Before
class A {
render() {
return (
<div />
)
}
}
After
class A {
render() {
return (
<div ref={this.props.forwardedRef}/>
)
}
}
Full Changelog: v1.0.0-alpha.30...v1.0.0-beta-1
v1.0.0-alph1.30
What's Changed
- Bump parse-url from 6.0.0 to 6.0.2 by @dependabot in #109
- Bump terser from 4.8.0 to 4.8.1 by @dependabot in #110
- Bump deep-object-diff from 1.1.7 to 1.1.9 by @dependabot in #114
- Bump decode-uri-component from 0.2.0 to 0.2.2 by @dependabot in #115
- Bump json5 from 1.0.1 to 1.0.2 by @dependabot in #116
- Tech refresh by @roderickhsiao in #117
- Bump webpack from 5.75.0 to 5.76.0 by @dependabot in #118
- Enforce that input components accept injected props by @chrissantamaria in #119
Full Changelog: v1.0.0-alpha.28...v1.0.0-alpha.30
1.0.0-alpha.28
Regenerate dist file to include updated type definition.
fix #108 (thanks @andyGallagher for reporting)
Full Changelog: v1.0.0-alpha.27...v1.0.0-alpha.28
v1.0.0-alpha.27
What's Changed
- Allow
null
ref value fortarget
argument ofuseInViewport
by @chrissantamaria in #107
New Contributors
- @chrissantamaria made their first contribution in #107
Full Changelog: v1.0.0-alpha.26...v1.0.0-alpha.27
v1.0.0-alpha.26
What's Changed
- Library should publish commonjs by @roderickhsiao in #106
Full Changelog: v1.0.0-alpha.25...v1.0.0-alpha.26
v1.0.0-alpha.25
What's Changed
- Improve type definition for HOC by @roderickhsiao in #105
Full Changelog: v1.0.0-alpha.24...v1.0.0-alpha.25
v1.0.0-alpha.24
What's Changed
- Allow passing class component by @roderickhsiao in #104
Full Changelog: v1.0.0-alpha.23...v1.0.0-alpha.24
v1.0.0-alpha.23
What's Changed
- Support React 18 by @roderickhsiao in #102
Full Changelog: v1.0.0-alpha.22...v1.0.0-alpha.23
v1.0.0-alpha.22
Full Changelog: 1.0.0-alpha.21...v1.0.0-alpha.22
- Remove flow from dependency