1.8.0 • Published 8 months ago
simple-react-signal v1.8.0
simple-react-signal
This is a simple signal library to create reactive values outside of the React lifecycle.
Usage
import { createSignal } from 'simple-react-signal';
const mySignal = createSignal('foo');
export function App() {
const [value, setValue] = mySignal.use();
const handleSetBar = () => {
setValue('bar');
}
return (
<button onClick={handleSetBar}>Set bar</button>
);
}