Skip to content

Latest commit

 

History

History
61 lines (43 loc) · 765 Bytes

migrate-v1-to-v2.md

File metadata and controls

61 lines (43 loc) · 765 Bytes

Migrate v1 to v2 guide

Share buttons

Before (v1)

import { ShareButtons } from 'react-share';

const {
  FacebookShareButton,
  TwitterShareButton,
} = ShareButtons;

After (v2)

import {
  FacebookShareButton,
  TwitterShareButton,
} from 'react-share';

Share counts

Before (v1)

import { ShareCounts } from 'react-share';

const {
  FacebookShareCount,
  GooglePlusShareCount,
} = ShareCounts;

After (v2)

import {
  FacebookShareCount,
  GooglePlusShareCount,
} from 'react-share';

Icons

Before (v1)

import { generateShareIcon } from 'react-share';

const FacebookIcon = generateShareIcon('facebook');

After (v2)

import { FacebookIcon } from 'react-share';