Cher Ami Router Versions Save

🚃  A fresh react router designed for flexible route transitions

v3.5.1

5 days ago

Patch for default props deprecated warning

v3.5.0

5 months ago

Re implement getPaused and setPaused because history block API don't keep the last URL pushed in history.

v3.4.0

7 months ago
  • remove getPaused and setPaused because history block API can do it. #149

  • props route returns queryParams & hash #153

    export type TRouteProps = {
      params?: TParams
      queryParams?: TQueryParams
      hash?: string
      [x: string]: any
    }
    

v3.3.0

7 months ago

Fix sub-router createUrl #154

When with createUrl of a sub-router, from a sub-router, the URL wasn't build properly on the server-side. This cause a diff of render between server and client.

To resolve this issue we need to:

  • Get an "is root router" state on server and client side
  • Harly reset all Routers property on each http request (because the nodejs runtime is not clear on each http request)
  • Rework createUrl() function: internalize all the getUrlByRouteName logic
  • Update and split tests
  • Remove old core getUrlByRouteName() & getFullPathByPath()
  • Remove core compileUrl(), use path-to-regexp compile instead

v3.2.1

7 months ago
  • replace jest by vitest (remove babel dependencies) #142
  • update documetation, add codesandox playground, fix anchors #144

v3.2.0

7 months ago

features

#141

  • Fix hydration error when server side staticLocation is "/foo" and client url is "/foo?some=param#anchor"
  • install turbo for run all dev examples
  • compile now with tsup instead of microbundle
  • test client and ssr hash and params
  • improve cache
  • update example-ssr

v3.1.2

8 months ago

Fix getStaticProps cache key #140

v3.1.1

8 months ago

Update all dependencies to their last version #139

v3.1.0

8 months ago

Feature

#138

Route matching with queryParams & hash

  • url /?foo=bar match with route with path /
  • url /?foo=bar#my-hash match with route with path /
  • url /bar?foo=bar#my-hash match with route with path /bar

TRoute returns

currentRoute have to return these properties:

{
    path: "/",
    queryParams: { "foo": "bar" }
    hash: "my-hash"
}
  • <Link> component to props (TOpenRouteParams) can take queryParams & hash properties
<Link to={{ name: "Home", queryParams:{"foo": "bar", "zoo": "hello"}, hash: "my-hash" }}>...</Link>
// will create the URL -> /?foo=bar&zoo=hello#my-hash

v3.0.1

8 months ago

fixes #137