Skip to content

Tags: NazoSnare/react-intersection-observer

Tags

v8.32.0

Toggle v8.32.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
feat: export the observe method (thebuilder#473)

v8.31.1

Toggle v8.31.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix: use WeakMap to avoid memory leak (thebuilder#463)

IntersectionObserver roots were tracked in a Map. This ensures it's possible to reuse the Intersection Observer instance if they share the same options. Changed to use a WeakMap, so unused root elements can be garbage collected.

Closes thebuilder#462

v8.31.0

Toggle v8.31.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
feat: add support for testing threshold values (thebuilder#417)

This expands the `test-utils` to support defining a `threshold` value when checking for `isIntersecting`. Before you could only give a `boolean`.

This should allow you test more complex `threshold` based scenarios.

v8.30.3

Toggle v8.30.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix: ensure threshold fallbacks to options value if undefined (thebui…

…lder#416)

v8.30.2

Toggle v8.30.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix: ensure thresholds is defined (thebuilder#415)

Sometimes the thresholds value on the IntersectionObserver instance could be undefined. Add a fallback to a default value in the cases where the browser doesn't set it.

This fixes thebuilder#414

v8.30.1

Toggle v8.30.1's commit message
fix: ensure undefined values are filtered from id

v8.30.0

Toggle v8.30.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
feat: use beforeEach instead of beforeAll (thebuilder#407)

v8.29.1

Toggle v8.29.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix: stringify array thresholds (thebuilder#404)

This fixes ensures Array thresholds are converted to a string when passed to the useCallback dependency array. This prevents infinite rerenders caused by arrays being recreated every render.

v8.29.0

Toggle v8.29.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
feat: support initialInView (thebuilder#394)

Add support for the `initialInView` option

v8.28.6

Toggle v8.28.6's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix: optimize InView (thebuilder#392)

This changes the rendering flow in the <InView> component, optimizing it for the children.

Previously it had a an internal state used to store the current inView and entry values. But it was only really used by the component when using the render props pattern. This lead to unnecessary renders for the plain component.

Another optimization tried to limit the state updates, so it would only occur if inView changed. This however meant you wouldn't get the correct entry value in the render prop, since it would only update when inView changes. This would prevent you from getting the latest threshold or isVisible values.