An open API service indexing awesome lists of open source software.

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

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.