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