...
Code Block |
---|
import { useSubscribe } from ‘@ombori/ga-messaging’; const App = () => { ... const {count, setCount} = useState(0); const useSubscribe useSubscribe('Test.Message', (msg) => { setCount(ct => ct + 1); }, [setCount]); return <div>Received {count} messages</div> }; |
...