wouter icon indicating copy to clipboard operation
wouter copied to clipboard

🥢 A minimalist-friendly ~2.1KB routing for React and Preact

Results 57 wouter issues
Sort by recently updated
recently updated
newest added

MemoryRouter is a great way to work with routes in Tests, and in sub-apps (like iframes). I could only find static routing, so I wrote this one down. What do...

When you use `useRoute` in a nested `Router` with `basepath` specified, the path matching only matches the path portion after the base path. For example, in the following configuration, ```...

I was not able to figure that out from the documentation. How do you handle a scenario when a parent route should render some layout with a child route inside?...

Due to calling `onEvent` (passed from props) after doing navigation, one cannot prevent cancelling the navigation process. I propose to call `onClick` before `navRef.current();` and then check if event was...

wondering what kind of feature drives everyone crazy? 😂

Here's my basic idea. Fixes #225 while remaining fully backwards compatible. Alternative to #226. For the nested router use-case, it will now be possible to do: ```typescript function NestedRouter(props) {...

Hello, so I am trying to redirect to a static file like so ```typescript import { Redirect, Route } from "wouter-preact"; import "./app.css"; import Header from './components/header/header'; import Navbar from...

The only thing missing from the `use-location` package is a way to actually subscribe to location updates. Let's say such a `subscribe` function was exported. Then users could do the...

Hi! Looking at the code for `useLocation`, I wonder if we can do something about the way `pushState` and `replaceState` events are currently handled. ## Basic issue Basically what I...

## About It would be nice if wouter could include query parameter destructuring ## Example ```tsx const { pathName, search, searchParams } = useLocation(); // `https://someplace.com/test?a=1234` console.log(pathName) // `/test`(like browser...