Skip to content

Topic5 react#4

Open
Facundo97Maldonado wants to merge 2 commits intomasterfrom
Topic5-React
Open

Topic5 react#4
Facundo97Maldonado wants to merge 2 commits intomasterfrom
Topic5-React

Conversation

@Facundo97Maldonado
Copy link
Owner

No description provided.

movie.title = this.state.title;
movie.year = this.state.year;
movie.duration = this.state.duration;
this.state.movieList.push(movie);

Choose a reason for hiding this comment

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

es mejor no cambiar directamente this.state, usar una variable auxiliar y después llamar a this.setState()

editedMovie.year = this.state.newYear;
editedMovie.duration = this.state.newDuration;
console.log(editedMovie);
this.state.movieList.splice(index,1,editedMovie);

Choose a reason for hiding this comment

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

lo mismo acá

isEdited: false,
})

//This hide the edit section after save it. Its wrong anyway

Choose a reason for hiding this comment

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

Por favor hace un refactor de esto

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.

2 participants