Skip to content
R

@rc-component/mutate-observer

React MutateObserver Component

by zombiejFree

#47in UI Libraries
0In stores

Description

@rc-component/mutate-observer is a React wrapper and hook for watching changes to the DOM. It gives you a typed way to use the browser's Mut…

Highlights

  • React component and hook for DOM mutations
  • Typed MutationObserver API
  • Full native MutationObserverInit options
  • Callback receives MutationRecord list and observer
  • TypeScript definitions included
  • MIT-licensed, used in Ant Design

Ratings & Reviews

No ratings yet

Be the first to rate @rc-component/mutate-observer.

People also visit

R

react-on-screen

A wrapper component to track if your react component is visible on screen

UI Libraries
Launch
R

react-resize-aware

A React hook that makes it possible to listen to element resize events

UI Libraries
Launch
R

react-visibility-sensor

Sensor component for React that notifies you

UI Libraries
Launch
R

rc-virtual-list

React Virtual List Component

UI Libraries
Launch
R

react-scrollchor

A React component for scrolling to #hash links with smooth animations

UI Libraries
Launch
R

@rc-component/portal

React Portal Component

UI Libraries
Launch

@rc-component/mutate-observer FAQ

What does this package do?

It lets a React component watch changes to a rendered DOM node, using the browser's MutationObserver API.

Can I use it as a hook?

Yes. useMutateObserver observes the element or elements you pass it, with the same callback and options as the component.

Which options can I set?

Any native MutationObserverInit option, such as attributes, childList and subtree.

What does the callback receive?

The list of MutationRecord entries and the native MutationObserver instance.

Is it part of Ant Design?

It is part of the Ant Design ecosystem, and Ant Design uses it as a DOM observation primitive.

What license is it under?

MIT.

What are the best @rc-component/mutate-observer alternatives?

Popular alternatives to @rc-component/mutate-observer include react-on-screen, react-resize-aware and react-visibility-sensor. See all @rc-component/mutate-observer alternatives

Developer Stuff

Badges