Repository to demonstrate changed behavior of useResolvedPath()
in
[email protected]
- Run
yarn install
to install dependencies. - Run
yarn dev
to start webpack-dev-server on http://localhost:8080. - Observe output of "path matches / ipsum", seems okay.
- Click "ipsum". Output of "path matches / ipsum" and "path matches / dolor"
both seem okay:
useResolvedPath("ipsum") -> {"pathname":"/ipsum",…} useResolvedPath("dolor") -> {"pathname":"/ipsum/dolor",…}
- Click "dolor". Output of "path matches / dolor" now has unexpectedly changed,
while output of "path matches / ipsum" is still okay:
useResolvedPath("dolor") -> {"pathname":"/ipsum/dolor/dolor",…}
- In
package.json
, change^6.19.0
to<6.19.0
. - Run
yarn install
andyarn dev
again. - Repeat instructions above and observe that "path matches / dolor" is correct:
useResolvedPath("dolor") -> {"pathname":"/ipsum/dolor",…}
This seems okay (6.18.0) | This seems wrong (6.19.0) |
---|---|
useResolvedPath("dolor") -> {"pathname":"/ipsum/dolor",…} |
useResolvedPath("dolor") -> {"pathname":"/ipsum/dolor/dolor",…} |