Improvements:
- TypeScript types are now bundled with the library, including types for React and
wouter/preact
! Types are properly tested and can be maintained in the same repo. Thanks to @Ty3uK @StrayFromThePath and @polRk - Wouter now comes with a standalone package with Preact-only version:
npm install wouter-preact
. This makes it possible to use properpeerDependecies
, and stop relying on React in your project #48 #49 cc/ @cedeber - 2nd argument of
useLocation
is now properly cached #74 #69 cc/ @neves - Links do not fire navigation when click using modifier keys like ctrl or ⌘ #68 thanks @marvinhagemeister
setLocation
now supports a 2nd argument which allows to performreplaceState
navigation (@Ty3uK via #52):
setLocation('/about', true); // calls replaceState instead of pushState