Simple Yandex.Share component for React
npm install --save react-yandex-share
or
yarn add react-yandex-share
<YandexShare />
Warning: it appends additional script
tag into document body, for load Yandex.Share library.
content
, contentByService
, theme
, hooks
- read official Yandex.Share API documentation for details.
import React from 'react';
import YandexShare from 'react-yandex-share';
class App extends React.Component {
render() {
return (
<div>
<YandexShare
content={{ title: 'My page' }}
theme={{ lang: 'en', services: 'vkontakte,facebook,twitter' }}
/>
</div>
);
}
}