1 | ## 2.0.0
|
2 |
|
3 | Consolidated CHANGELOG for v2:
|
4 |
|
5 | * Split `Link` into `Link` (regular `children`) and `AsyncLink` (`children` is a render-invoked function).
|
6 | * `Link` no longer does shallow prop comparison (this can be added on the user's end using `React.memo`).
|
7 | * Rename `curiProvider` to `createRouterComponent`
|
8 | * Use hooks in `Link`.
|
9 | * Use hooks in `Router` (component created by `curiProvider`).
|
10 | * Add `useRouter` hook for accessing the router.
|
11 | * Add `useResponse` hook for accessing the current response/navigation objects.
|
12 | * Add `useActive` hook for checking if a route is "active".
|
13 | * Add `useNavigating` hook for cancelling async navigation.
|
14 | * Add `useURL` hook for generating an HREF string.
|
15 | * Add `useLocation` hook for generation a location object.
|
16 | * Remove `Active` component (prefer `useActive`).
|
17 | * Remove `Block` component.
|
18 | * Remove `Navigating` component (prefer `useNavigating`).
|
19 | * Rename `Curious` to `ResponseConsumer`.
|
20 | * Export `RouterConsumer` context consumer component.
|
21 | * Import common Curi types from `@curi/types`.
|
22 |
|
23 | ## 1.2.1
|
24 |
|
25 | * `<Link>` uses `router.navigate()`'s return function to prevent unnecessary `setState`s.
|
26 |
|
27 | ## 1.2.0
|
28 |
|
29 | * Add `forward` prop to `Link` for passing props to rendered component.
|
30 | * Deprecate passing props from `Link` to rendered component.
|
31 | * `<Link>` takes `name` prop, preferable over `to`.
|
32 | * Only export public TypeScript types.
|
33 | * `<Link>` with no `to` prop outputs anchor with relative `href`.
|
34 | * `<Link>` is no longer a pure component.
|
35 | * Add `<Navigating>` component, which lets the user know when asynchronous routes are navigating and cancel the navigation.
|
36 |
|
37 | ## 1.1.2
|
38 |
|
39 | * Guard `setState()` calls for unmounted `<Link>`.
|
40 |
|
41 | ## 1.1.1
|
42 |
|
43 | * Add `sideEffects: false` hint for Webpack.
|
44 | * Component returned by `curiProvider()` fully stores `emitted` value in state.
|
45 |
|
46 | ## 1.1.0
|
47 |
|
48 | * Add `preserve` prop to `<Focus>` to preserve an existing focus (do not steal). Only works if the existing focused element is a child of the one the `ref` is attached to.
|
49 |
|
50 | ## 1.0.0-beta.4
|
51 |
|
52 | * Revert dual-mode (not ready yet!).
|
53 |
|
54 | ## 1.0.0-beta.3
|
55 |
|
56 | * Support dual-mode package (CJS/ESM) builds.
|
57 |
|
58 | ## 1.0.0-beta.2
|
59 |
|
60 | * Export a `curiProvider()` function to create a routing provider component instead of a `<CuriProvider>`.
|
61 |
|
62 | ## 1.0.0-beta.1
|
63 |
|
64 | * Add `preventScroll` prop to `<Focus>`. When `false` (default), the page will scroll to the element that it focuses. When `true`, the page will not scroll.
|
65 |
|
66 | ## 1.0.0-beta.0
|
67 |
|
68 | * Added `@curi/react-dom`. This package has its own `<Link>` and `<Focus>` components, which rely on DOM APIs. This package re-exports all of `@curi/react`'s exports.
|