Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/2nthony/recomposition-api

(POC) Vue composition api flavoured React hooks
https://github.com/2nthony/recomposition-api

Last synced: 2 months ago
JSON representation

(POC) Vue composition api flavoured React hooks

Awesome Lists containing this project

README

        

# recomposition-api

[![version](https://img.shields.io/npm/v/recomposition-api?label=&color=29BC9B)](https://npm.im/recomposition-api) [![downloads](https://img.shields.io/npm/dm/recomposition-api?label=&color=29BC9B)](https://npm.im/recomposition-api)

POC

## Install

```bash
npm i recomposition-api
```

## Usage

```ts
import { useState } from 'react';
import { useWatch } from 'recomposition-api';

export default function App() {
const [count, setCount] = useState(0);

useWatch(count, (val, oldVal) => {
console.log(val, oldVal);
});

return (


setCount(count + 1)}>{count}

);
}
```

## Sponsors

[![sponsors](https://cdn.jsdelivr.net/gh/2nthony/sponsors-image/sponsors.svg)](https://github.com/sponsors/2nthony)

## License

MIT © [2nthony](https://github.com/sponsors/2nthony)