BitBoxSwiss / bitbox-wallet-app

The BitBoxApp for desktop and mobile.
https://bitbox.swiss/app
Apache License 2.0
251 stars 82 forks source link

frontend: prefer arrow functions #2731

Closed thisconnect closed 2 months ago

thisconnect commented 3 months ago

Refactored to use arrow functions to provide a more concise syntax and ensure a consistent style across the codebase. Arrow functions are preferred in this context as they do not bind their own this, making them a better fit for functional components and callbacks.

Traditional function expressions were retained where necessary, such as for methods requiring their own this context, constructor functions, or where hoisting is necessary.

TypeScript's type system helps identify issues related to this binding and potential hoisting problems.

thisconnect commented 2 months ago

rebased