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

Why not use ES6? #17

Open
GuoXiaoyang opened this issue Nov 7, 2017 · 1 comment
Open

Why not use ES6? #17

GuoXiaoyang opened this issue Nov 7, 2017 · 1 comment
Assignees

Comments

@GuoXiaoyang
Copy link

Sorry to disturb you. I think your resume template is helpful. However I just wondered why you do not use es6 which I think will make the code more clear...

@suddi suddi self-assigned this Nov 7, 2017
@suddi
Copy link
Owner

suddi commented Nov 7, 2017

@GuoXiaoyang I am using ES6 aspects. Specifically, I am using const for variable declarations everywhere.
But I guess you're referring to using ES6 classes for React class creation?

I have been meaning to do this, just have not had the time to make the switch.
One thing I do not like about using ES6 classes to extend React.Component is that, we lose the auto-binding capability and we need to bind the context separately. I was initially hesitant to make this switch before and that is why I introduced create-react-class as a dependency, but now having seen a number of examples, I will switch to using arrow functions in method definitions.

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

No branches or pull requests

2 participants