7.0.0-alpha.0 (2023-02-17)
Features
- expose the original label in children prop for custom label functions in tab navigators (a6fd49f) - by @satya164
BREAKING CHANGES
- Initially the
Link
component was designed to work with path strings via theto
prop. But it has few issues:
- The path strings are not type-safe, making it easy to cause typos and bugs after
refactor - The API made navigating via screen name more incovenient, even if that's the preferred approach
This revamps the API of the Link
component to make it easier to use. Instead of to
prop, it now accepts screen
and params
props, as well as an optional href
prop to
use instead of the generated path.
e.g.:
<Link screen="Details" params={{ foo: 42 }}>Go to Details</Link>
This also drops the useLinkTo
hook and consolidates into the useLinkTools
hook - which lets us build a href
for a screen or action for a path.