I want to put a button on the page, while working I use React. I tried in a simple way:

<div className="fb-like" data-href="https://developers.facebook.com/docs/plugins/" data-layout="box_count" data-action="like" data-size="small" data-show-faces="false" data-share="false"></div> 

Unfortunately, the button is not displayed, at the same time there are no errors in the console ... How to install this button in React?

  • My crystal ball tells me that rather you all do not distinguish between html and jsx, and use the className inside the html, rather than inside the render of the reactor component. - Duck Learns to Take Cover
  • Well, or just do not ship fasebook sdk, in which apparently the styles of this button are also buried. Try replacing "className" with just "class" in the first case, re-read the documentation carefully in the second. Give more complete code if nothing helped. - Duck Learns to Take Cover
  • the crystal ball misleads you) I have a reactor component, the Panel. I need to put the Facebook and Google buttons inside this component. in the Facebook documentation they write class, but I tried in the Panel renderer to write the code given in the className question, did not help. then i found this at npmjs.com/package/react-facebook it fits better. true when rendering pops up an error in the GET request, which makes a component of this library - Iga

0