{"id":30580532,"url":"https://github.com/react-component/mutate-observer","last_synced_at":"2025-08-29T05:36:44.868Z","repository":{"id":65184881,"uuid":"575890626","full_name":"react-component/mutate-observer","owner":"react-component","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-24T10:35:27.000Z","size":39,"stargazers_count":8,"open_issues_count":1,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-26T11:20:50.827Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/react-component.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-08T14:29:36.000Z","updated_at":"2025-08-17T03:08:56.000Z","dependencies_parsed_at":"2024-06-18T17:01:27.468Z","dependency_job_id":"b3a966b1-dace-481a-a878-6dbca24bba69","html_url":"https://github.com/react-component/mutate-observer","commit_stats":{"total_commits":31,"total_committers":5,"mean_commits":6.2,"dds":"0.29032258064516125","last_synced_commit":"e0403d2f5e365ad92d60434f49e12c5cba85f718"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":"react-component/portal","purl":"pkg:github/react-component/mutate-observer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fmutate-observer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fmutate-observer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fmutate-observer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fmutate-observer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/react-component","download_url":"https://codeload.github.com/react-component/mutate-observer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fmutate-observer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272636155,"owners_count":24967983,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-29T05:36:41.775Z","updated_at":"2025-08-29T05:36:44.851Z","avatar_url":"https://github.com/react-component.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rc-mutate-observer\n\nMutateObserver for React.\n\n[![NPM version][npm-image]][npm-url] [![dumi](https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square)](https://github.com/umijs/dumi) [![build status][github-actions-image]][github-actions-url] [![Codecov][codecov-image]][codecov-url] [![npm download][download-image]][download-url]\n\n[npm-image]: http://img.shields.io/npm/v/@rc-component/mutate-observer.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/@rc-component/mutate-observer\n[github-actions-image]: https://github.com/react-component/mutate-observer/workflows/CI/badge.svg\n[github-actions-url]: https://github.com/react-component/mutate-observer/actions\n[codecov-image]: https://img.shields.io/codecov/c/github/@rc-component/mutate-observer/master.svg?style=flat-square\n[download-image]: https://img.shields.io/npm/dm/@rc-component/mutate-observer.svg?style=flat-square\n[download-url]: https://www.npmjs.com/package/@rc-component/mutate-observer\n\n## Development\n\n```bash\nnpm install\nnpm run start\nopen http://localhost:8000\n```\n\n## Install\n\n[![@rc-component/mutate-observer](https://nodei.co/npm/mutate-observer.png)](https://www.npmjs.com/package/@rc-component/mutate-observer)\n\n## Usage\n\n```tsx | pure\nimport React from 'react';\nimport MutateObserver from './src';\n\nconst onMutate = (mutations: MutationRecord[], observer: MutationObserver) =\u003e {\n  console.log(mutation);\n  console.log(observer);\n};\n\nconst Demo: React.FC = () =\u003e {\n  return (\n    \u003cMutateObserver onMutate={onMutate}\u003e\n      \u003cdiv\u003etest\u003c/div\u003e\n    \u003c/MutateObserver\u003e\n  );\n};\n\nexport default Demo;\n```\n\n## 🔥 API\n\nWe use typescript to create the Type definition. You can view directly in IDE. But you can still check the type definition [here](https://github.com/react-component/mutate-observer/blob/master/src/interface.ts).\n\n### mutate-observer\n\n| Prop     | Description                                                                                                      | Type                 | Default |\n| -------- | ---------------------------------------------------------------------------------------------------------------- | -------------------- | ------- |\n| onMutate | A function which will be called on each DOM change that qualifies given the observed node or subtree and options | MutationCallback     | -       |\n| options  | An object providing options that describe which DOM mutations should be reported to mutationObserver's callback  | MutationObserverInit | -       |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-component%2Fmutate-observer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freact-component%2Fmutate-observer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-component%2Fmutate-observer/lists"}