Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 748 Bytes

File metadata and controls

25 lines (17 loc) · 748 Bytes
id title sidebar_label
link
Link
Link

The Link component lets us navigate to a screen using a path instead of a screen name based on the linking options. It preserves the default behavior of anchor tags in the browser such as Right click -> Open link in new tab", Ctrl+Click/⌘+Click etc.

It uses a Text component under the hood.

Example:

import { Link } from '@react-navigation/native';

// ...

function Home() {
  return <Link to="/profile/jane">Go to Jane's profile</Link>;
}

If you want to use your own custom touchable, you can use useLinkProps instead

The Link component accepts the same props as useLinkProps