Skip to content

Releases: molefrog/wouter

Preact 10.0, generic types and missing updates

10 Oct 12:04
Compare
Choose a tag to compare
  • Wouter now is fully-compatible with Preact 10.0! You can install Preact version via npm install wouter-preact #88, thanks @developit
  • Type definitions now support generics, handy if you want to specify a shape of props your component accepts #87, thanks @ArnaudBarre
  • useLocation now also catches updates that may happens between the initial render and useEffect call. See #85
  • Redirect component now uses useLayoutEffect to trigger the update as soon as possible and prevent apps from flicker.

Types, types, types... and Preact-only package!

12 Aug 15:56
Compare
Choose a tag to compare

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 proper peerDependecies, 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 perform replaceState navigation (@Ty3uK via #52):
setLocation('/about', true); // calls replaceState instead of pushState

v2.1.1

08 Jul 16:37
Compare
Choose a tag to compare

Bugfixes:

  • Fix Route/Switch dynamic segments rendering bug #45 / @jeetiss

v2.1.0

28 Jun 15:43
Compare
Choose a tag to compare

Improvements:

  • Implicit routers are always created once #44
  • useLocation accepts router as an argument #44
  • Proper dependencies in useEffect, code only runs on mount/unmount #41 @jeetiss
  • Matcher refactoring #42 @jeetiss

v1.3.2

30 May 11:33
Compare
Choose a tag to compare

Bugfixes:

  • Adds react-deps.js to the list of files to publish #34

Preact is there!

27 May 09:11
Compare
Choose a tag to compare

New functionality:

  • Added a support for Preact #29 Thanks @StrayFromThePath!

v1.2.3

13 May 20:49
Compare
Choose a tag to compare

Bugfixes:

  • Fixes a critical typo in <Link /> component which resulted being unable to customize the link element #26

v1.2.2

13 May 16:21
Compare
Choose a tag to compare

Bugfixes:

  • History supports back/go navigation
  • Navigation creates an entry in History #25

v1.2.1

13 May 16:18
Compare
Choose a tag to compare

Bugfixes:

  • Fix code typo in Redirect component (#21 by @StrayFromThePath)

Roller Blades

29 Apr 19:47
Compare
Choose a tag to compare

  • New <Redirect> and <Switch> components #7
  • Make the code ES6 compliant #10
  • Add onClick handler to <Link> component #12
  • Better support for SSR with extra/static-history.js history #6
  • A project logo by Katya Vakulenko