import { useEffect, useState } from 'react'; import type { WuAppFacade } from 'wu-framework'; export default function App({ appWu }: { appWu: WuAppFacade }) { const [count, setCount] = useState(() => appWu.store.get('demo.counter') ?? 0); useEffect(() => { const stop = appWu.store.on('demo.counter', (value) => setCount(value)); setCount(appWu.store.get('demo.counter') ?? 0); return stop; }, [appWu]); function change(delta: number) { appWu.store.update('demo.counter', (current) => (current ?? 0) + delta); } return (

React ยท mi-plataforma

Valor compartido: {count}

{' '}
); }