News for hackers. Stuff that matters.
Re:Learning Node.js and React while building a product by jbrantly on Tuesday June 13, 2017 @04:36PM (#14548399)
One problem with using fat arrow syntax like this is the method is no longer attached to the prototype so it's not shared across all instances and is less memory efficient. It also doesn't work well with React HMR if you're using that. If you can use decorators I highly recommend autobind-decorator: https://github.com/andreypopp/autobind-decorator

Also I think you're using a TypeScript-specific `private` syntax there which likely changes the runtime semantics so my comment really only applies if you don't use that.

There are no comments on this comment yet.