Open Bug 1600789 Opened 5 years ago Updated 2 years ago

Use bound functions in React components, rather than .bind(this)

Categories

(DevTools :: Performance Tools (Profiler/Timeline), task, P3)

task

Tracking

(Not tracked)

People

(Reporter: gregtatum, Unassigned)

References

(Blocks 1 open bug)

Details

From https://phabricator.services.mozilla.com/D55010

You know what I found today? Firefox now supports bound functions out of the box without transpiling!
(actually it looks it's supported for some time now).

So you could define handleRestart with handleRestart = () => { and remove the constructor completely!

I think it would be easier to do this all at once across the performance-new component.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.