Support for sec
npm i @vanyamate/sec-react
// /model/todo/todo.model.ts
import { store } from '@vanyamate/sec';
export const todoLoading = store(false);
import { useStore } from '@vanyamate/sec-react';
// any react component
const loading = useStore(todoLoading);
if (loading) {
return <Loader/>;
}
return (
<Component/>
);