waku-navigation
v0.0.1
Published
Waku Router implementation with Navigation API
Downloads
28
Readme
waku-navigation
Experimental Waku Router implementation with Navigation API
Install
npm install waku-navigationUsage
Create this file as ./src/waku.client.tsx:
import { StrictMode } from 'react';
import { createRoot, hydrateRoot } from 'react-dom/client';
import { Router } from 'waku-navigation';
const rootElement = (
<StrictMode>
<Router />
</StrictMode>
);
if ((globalThis as any).__WAKU_HYDRATE__) {
hydrateRoot(document, rootElement);
} else {
createRoot(document as any).render(rootElement);
}