Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/2nthony/recomposition-api
- Owner: 2nthony
- License: mit
- Created: 2022-12-05T07:56:16.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-09T00:25:50.000Z (3 months ago)
- Last Synced: 2024-10-12T08:43:58.997Z (3 months ago)
- Language: TypeScript
- Homepage:
- Size: 42 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)