How to use the wouter-preact/static-location function in wouter-preact

To help you get started, we’ve selected a few wouter-preact examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kidqueb / preact-polka-ssr / src / lib / getRouterHook.js View on Github external
export default (req = {}) => {
  if (typeof window !== "undefined") return useLocation
  return useStaticLocation(req.url)
}

wouter-preact

Minimalist-friendly ~1.5KB router for Preact

Unlicense
Latest version published 2 months ago

Package Health Score

80 / 100
Full package analysis