New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

react-hashtags

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-hashtags

a simple React component that checks # on a sentence and build a Link on it

latest
Source
npmnpm
Version
1.0.7
Version published
Weekly downloads
13
333.33%
Maintainers
1
Weekly downloads
 
Created
Source

react-hashtags

a simple React component that checks # on a sentence and build a Link on it

Installation

with npm

npm install react-hashtags

or with yarn

yarn add react-hashtags

Usage

In your component

...
import React from 'react'
import PropTypes from 'prop-types'

import Hashtag from 'react-hashtags'

const Caption = (props) => (
  <div>
    <Hashtag string={props.description} url={'/search/tags'} />
  </div>
)

Caption.propTypes = {
  description: PropTypes.string.isRequired,
}

export default Caption

// description = "Let's create a #hashtag"
// result = Let's create a <Link to="/search/tags/hashtag">#hashtag</Link>

you can then point /search/tags/<hashtags> to a search result page with hashtag as req.params

FAQs

Package last updated on 23 Jan 2018

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