https://github.com/streamich/react-micro-lifecycles
Life-cycles for React DOM elements
https://github.com/streamich/react-micro-lifecycles
Last synced: 9 months ago
JSON representation
Life-cycles for React DOM elements
- Host: GitHub
- URL: https://github.com/streamich/react-micro-lifecycles
- Owner: streamich
- Created: 2018-03-28T21:53:46.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2025-09-03T01:04:37.000Z (10 months ago)
- Last Synced: 2025-09-03T03:11:48.669Z (10 months ago)
- Language: JavaScript
- Size: 178 KB
- Stars: 17
- Watchers: 1
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-micro-lifecycles
Use micro-life-cycles:
```jsx
console.log('element attached: ', el, props)}
$update={(el, props, oldProps) => console.log('element updated: ', el, props, oldProps)}
$detach={(el, oldProps) => console.log('element detached: ', el, oldProps)}
/>
```
Installation:
```js
require('react-micro-lifecycles/lib/patchStable');
```
or
```js
require('react-micro-lifecycles/lib/patchUnstable');
```
`patchStable` uses React stateful components, `patchUnstable` does not use React stateful components —
it uses only `ref` prop.