@rc-component/mutate-observer
React MutateObserver Component
Last updated 4 months ago by afc163 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @rc-component/mutate-observer 
SYNC missed versions from official npm registry.

@rc-component/mutate-observer

MutateObserver for React.

NPM version npm download build status Codecov bundle size dumi

Development

npm install
npm run start
open http://localhost:8000

Install

@rc-component/mutate-observer

Usage

import React from 'react';
import MutateObserver from 'rc-component/mutate-observer';

const onMutate = (mutations: MutationRecord[], observer: MutationObserver) => {
  console.log(mutation);
  console.log(observer);
};

const Demo: React.FC = () => {
  return (
    <MutateObserver onMutate={onMutate}>
      <div>test</div>
    </MutateObserver>
  );
};

export default Demo;

???? API

We use typescript to create the Type definition. You can view directly in IDE. But you can still check the type definition here.

mutate-observer

Prop Description Type Default
onMutate A function which will be called on each DOM change that qualifies given the observed node or subtree and options MutationCallback -
options An object providing options that describe which DOM mutations should be reported to mutationObserver's callback MutationObserverInit -

Current Tags

  • 2.0.1                                ...           latest (4 months ago)

5 Versions

  • 2.0.1                                ...           4 months ago
  • 2.0.0                                ...           a year ago
  • 1.1.0                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
  • 1.0.0-alpha.1                                ...           3 years ago
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 2
Last Month 2
Dependencies (1)
Dev Dependencies (22)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |