mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-10 09:43:10 +00:00
10 lines
267 B
TypeScript
10 lines
267 B
TypeScript
import { createContext, useContext } from 'react';
|
|
import Waku from 'waku/waku';
|
|
|
|
export type WakuContextType = {
|
|
waku?: Waku;
|
|
};
|
|
|
|
export const WakuContext = createContext<WakuContextType>({ waku: undefined });
|
|
export const useWaku = () => useContext(WakuContext);
|