From f90533825fb42230d48b1b1f9d3652b02d109e46 Mon Sep 17 00:00:00 2001 From: Tobias Date: Mon, 20 May 2024 12:35:24 +0200 Subject: [PATCH] Doc: Fix example Based on https://github.com/nanostores/router/pull/37#issuecomment-2120151010 --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 268290e..f578af0 100644 --- a/README.md +++ b/README.md @@ -158,9 +158,7 @@ export const $router = createRouter({ … }, { links: false }) function onClick (e) { e.preventDefault() - let path = new Url(event.target.href).pathname - let params = $router.get()?.search - openPage($router, '…', { }, { ...params }) + $router.open(new Url(e.target.href).pathname) } export const Link = (props) => {