Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structuring and ES6 #22

Open
dstuecken opened this issue May 20, 2016 · 1 comment
Open

Structuring and ES6 #22

dstuecken opened this issue May 20, 2016 · 1 comment

Comments

@dstuecken
Copy link
Contributor

dstuecken commented May 20, 2016

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.

@olahol
Copy link
Owner

olahol commented May 24, 2016

Yep, this is something that should be done in version 2, the original component is really old and not fun to modify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants