Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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>
};

...