EvgenBabenko / incode-app

0 stars 0 forks source link

Binding #8

Closed olegmdev closed 6 years ago

olegmdev commented 6 years ago

https://github.com/EvgenBabenko/incode-app/blob/f/async/src/containers/Auth.jsx#L10

Please take a look at binding strategies in React and their pros/cons. Take thoughtfully this article https://medium.com/@charpeni/arrow-functions-in-class-properties-might-not-be-as-great-as-we-think-3b3551c440b1

Summary:

The initialization of arrow functions in class properties are transpiled into the constructor. Arrow functions in class properties won’t be in the prototype and we can’t call them with super. Arrow functions in class properties are much slower than bound functions, and both are much slower than usual function.

EvgenBabenko commented 6 years ago

got it, to do in new branch (f/async) i'm working on it

EvgenBabenko commented 6 years ago

https://github.com/EvgenBabenko/incode-app/blob/f/async/src/containers/Auth.jsx#L10

fixed