mirror of
https://github.com/logos-messaging/examples.waku.org.git
synced 2026-01-03 05:13:08 +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);
|