Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@times-components/link

Package Overview
Dependencies
Maintainers
4
Versions
536
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@times-components/link

component to handle links and navigation

  • 0.10.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
772
increased by17.86%
Maintainers
4
Weekly downloads
 
Created
Source

This component wraps its children to make them clickable and turn them into hyperlinks for web.

How to use

import Link, { TextLink } from "@times-components/link";

// works with block elements
<Link url="https://thetimes.co.uk" onPress={doSomeNavigation(url)}>
  <View style={{ width: 100, height: 100, backgroundColor: "pink" }} />
</Link>

// and also with inline text
<TextLink url="https://thetimes.co.uk/" onPress={doSomeNavigation(url)}>
  The Times
</TextLink>

Typically, apps will need to use the onPress callback to bubble up navigation so that the parent native Activity or UIViewContoller can handle the navigation, rather than multiple Activities or UIViewContollers mistakingly navigating multiple times in native land.

Keywords

FAQs

Package last updated on 09 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc