Skip to content
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

Solution #2602

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Solution #2602

wants to merge 2 commits into from

Conversation

szymonpachucki
Copy link

No description provided.

Comment on lines 13 to 15
for (const key in extraData) {
state[key] = extraData[key];
}
Copy link

@choeqq choeqq Jul 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are special method for that: Object.assign()

Comment on lines 34 to 35
default:
break;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

break provide some kind of Error message

break;

case 'removeProperties':
const keysToRemove = currentAction.keysToRemove;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can also use object destructuring

for (const currentAction of actions) {
switch (currentAction.type) {
case 'addProperties':
const extraData = currentAction.extraData;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can also use object destructuring

Copy link

@choeqq choeqq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting for any updates @szymonpachucki 👀

Copy link

@JoyCoffeeAddict JoyCoffeeAddict left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolve previous suggestions

Copy link

@choeqq choeqq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks alright, but please remember about object destructuring

@ihor-jpeg ihor-jpeg closed this Aug 8, 2023
@ihor-jpeg ihor-jpeg reopened this Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants