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

cf-component-link

Package Overview
Dependencies
Maintainers
11
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cf-component-link

CloudFlare Link Component

  • 4.0.1
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
11
Weekly downloads
 
Created
Source

CloudFlare Link Component

Installation

$ npm install cf-component-link

Usage

const React = require('react');
const Link = require('../../src/index');

class Application extends React.Component {
  render() {
    return (
      <div>
        <h1>CloudFlare Link Component Example</h1>

        <p>Create a <code>Link</code> with a <code>to</code> prop:</p>
        <Link to="/">Link to /</Link>

        <p>Alternatively you can pass an <code>onClick</code> handler:</p>
        <Link onClick={this.handleClick}>Link to something</Link>
        <p>Note: This will give it a <code>role="button"</code></p>

        <p>All additional props will be added to the <code>Link</code> element:</p>
        <Link to="/foo" className="special-link">Link to /foo</Link>

        <p>You can even specify <code>tagName</code>:</p>
        <Link to="/bar" tagName="button">Link to /bar</Link>

        <p>Or <code>disable</code> the link and it wont do anything when clicked:</p>
        <Link to="/bar" disabled>Link to /bar</Link>
      </div>
    );
  }
}

Note: This requires that you setup cf-util-route-handler prior to routing.

FAQs

Package last updated on 27 Feb 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