react-social icon indicating copy to clipboard operation
react-social copied to clipboard

Structuring and ES6

Open dstuecken opened this issue 8 years ago • 1 comments

How about structuring the components into separate files?

I'd go with this directory structure:

- index.js
- lib
| jsonp.js
| - Components
| | - Facebook
| | | - FacebookButton
| | | | - facebookbutton.js
| | | | - index.js
| | | - FacebookCount
| | | | - facebookcount.js
| | | | - index.js
| | - Xing
| | | - XingButton
| | | | - xingbutton.js
| | | | - index.js

.. and so on. What do you think?

The more buttons and functions, the more unmaintainable it will be with one single file in future.

It would also be nice to have different example styles for the buttons (with optional FontAwesome icons for instance). This would lead to an easier integration for new react users.

I'd also propose to switch to ES6 syntax in that step.

dstuecken avatar May 20 '16 07:05 dstuecken