Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
react-external-link
Advanced tools
This library provides a simple `ExternalLink` component for [react](https://es.reactjs.org/) which can be used to render `a` tags with both `target="_blank"` and `rel="noopener noreferrer"` attributes.
This library provides a simple ExternalLink
component for react which can be used to render a
tags with both target="_blank"
and rel="noopener noreferrer"
attributes.
Using npm: npm istall react-external-link --save
Using yarn: yarn add react-external-link
If you just need a simple link with no custom text:
import React from 'react';
import { ExternalLink } from 'react-external-link';
const MyComponent = () => (
<div>
<ExternalLink href="https://example.com" />
</div>
);
export default MyComponent;
This will be rendered as <a href="https://example.com" target="_blank" rel="noopener noreferrer">https://example.com</a>
.
If you need to provide a custom content, you can do so by providing the ExternalLink
's children
:
import React from 'react';
import { ExternalLink } from 'react-external-link';
const MyComponent = () => (
<div>
<ExternalLink href="https://example.com">
<span>Visit the site</span>
<ExternalLink>
</div>
);
export default MyComponent;
This will be rendered as:
<a href="https://example.com" target="_blank" rel="noopener noreferrer">
<span>Visit the site</span>
</a>
FAQs
[![Build Status](https://img.shields.io/github/actions/workflow/status/acelaya/react-external-link/ci.yml?branch=main&logo=github&style=flat-square)](https://github.com/acelaya/react-external-link/actions/workflows/ci.yml) [![Code Coverage](https://img.sh
We found that react-external-link demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.