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: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/liammartens/simple-react-signal
- Owner: LiamMartens
- Created: 2023-09-03T01:19:16.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-21T03:25:47.000Z (over 1 year ago)
- Last Synced: 2024-11-19T06:01:10.702Z (about 1 month ago)
- Language: TypeScript
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.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
);
}
```