React FB Like React component for facebook Like and Share button!
How to install
npm install react-fb-like --save
How to use
var ReactFBLike = require('react-fb-like'); <ReactFBLike language="ko_KR" appId="717589285046812" version="v2.12" />
import ReactFBLike from 'react-fb-like';
It renders only once
If you go to the another page and come back to where this component locates, sometimes this component disappears.
This is because this component is rendered only once when FB script loads.
So if you want to manually show this component again, you should call
You can use all props that facebook supports. But be careful! You should use camelCase. And attribute ref is changed to reference because it is a reserved word in React.
- language(such as en_US, ko_KR, fr_FR) supported language
- version: version of facebook-jssdk, default: 'v2.12'
- reference(which is a ref attribute in facebook)
Subscribe to React.js Examples
Get the latest posts delivered right to your inbox