Types, types, types... and Preact-only package!
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
useLocationis now properly cached #74 #69 cc/ @neves - Links do not fire navigation when click using modifier keys like ctrl or ⌘ #68 thanks @marvinhagemeister
setLocationnow supports a 2nd argument which allows to performreplaceStatenavigation (@Ty3uK via #52):
setLocation('/about', true); // calls replaceState instead of pushState