-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add babel plugin-transform-object-rest-spread #49168
Comments
Triggered auto assignment to @isabelastisser ( |
@isabelastisser Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Discussion here: https://expensify.slack.com/archives/C05LX9D6E07/p1726226725648319 @OlimpiaZurek, please reopen this issue once the P/S has been updated and approved in Slack. Thanks! |
@isabelastisser I updated the P/S in Slack and also the description of the issue, but I can't reopen it. |
Problem:
Using the spread operator to merge objects in some performance-critical situations (e.g., frequent function calls) creates unnecessary intermediate objects, negatively impacting memory and performance. The current ESLint rule enforces the spread operator, and developers may follow it without considering better alternatives like
Object.assign()
, which can improve code efficiency.Solution:
Adding Babel’s
plugin-transform-object-rest-spread
to convert spread operators toObject.assign()
at compile time. This approach maintains code consistency, reduces cognitive overhead for developers, and ensures performance optimizations without having to manually refactor each instance.The text was updated successfully, but these errors were encountered: