@rkrupinski/stan
v1.5.0
Published
Minimal, type-safe state management
Readme
Stan
Minimal, type-safe state management
🌐 Website | 📘 API docs | 📝 Examples | 📰 Blog Post
A sneak peek:
import { selectorFamily } from '@rkrupinski/stan';
import { useStanValue } from '@rkrupinski/stan/react';
const deepThought = selectorFamily<string, string>(
question => () => thinkDeep(question),
);
const MyApp: FC<{ question: string }> = ({ question }) => {
const answer = useStanValue(deepThought(question));
return (
<p>
The Answer to "{question}" is "{answer}"!
</p>
);
};