Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/liammartens/simple-react-signal
https://github.com/liammartens/simple-react-signal
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/liammartens/simple-react-signal
- Owner: LiamMartens
- Created: 2023-09-03T01:19:16.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-21T03:25:47.000Z (about 1 year ago)
- Last Synced: 2024-10-18T16:13:05.696Z (18 days ago)
- Language: TypeScript
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# simple-react-signal
This is a simple signal library to create reactive values outside of the React lifecycle.## Usage
```jsx
import { createSignal } from 'simple-react-signal';const mySignal = createSignal('foo');
export function App() {
const [value, setValue] = mySignal.use();const handleSetBar = () => {
setValue('bar');
}return (
Set bar
);
}
```