React Sharing Buttons No Extra Javascript Imports Sample in 2020

React Sharing Buttons No Extra Javascript Imports Sample in 2020


tutorials -

react-social-sharing

React Implementation of @mxstbr sharingbuttons.io No Extra Javascript Imports. No Tracking. Just Links, SVG and CSS.

Basic Usage

yarn add react-social-sharing
import React from 'react'
import { Twitter } from 'react-social-sharing'

export default () => <Twitter link="https://github.com" />

Localization

To any button for localization of the aria-label you can pass a function like so:

<Twitter
  link="https://github.com"
  label={serviceName => localise('share_label', { serviceName })}
/>

This function receives the name of the service and the return value is the aria-label and title used in the anchor.

This name is automatically filled by the package but you can override this with the name prop.

GitHub

Trending On Tutorial Stuff

Our Sponsors

Top Applications in Tutorial Stuff

Top Experts In Tutorial Stuff