-
Notifications
You must be signed in to change notification settings - Fork 483
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
usafe component will receive props #538
usafe component will receive props #538
Conversation
Let's refactor it to |
Hello @MaxSvargal made some progress on using |
} | ||
|
||
// this.setIndexCurrent(index); | ||
// this method heavily realies on having access to the class :/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
realies -> relies
@benitogf Can you checkout the unit test that failed, it returned the wrong transform. could you also fix the typo in the comments? |
@jeanpoelie will take a look to this one on the weekend 👍 could we merge the UNSAFE_componentWillReceiveProps while we switch to getDerivedStateFromProps though? |
I went ahead and merged #551 after resolving the conflicts. |
@benitogf did you find the time to take a look at this? |
Hello, I was trying to take a look at this one but found that currently the class has both unsafe labeled and regular methods is there a reason for that? shouldn't just the unsafe call be ok? about the issue itself, found that this.indexCurrent = indexCurrent allows switching between a "controled" and "uncontrolled" state, moving forward I think that the component should be fully controled after the initial render, changing the state acording to prop changes is an antipattern? Just sharing what I have found so far, glad to get other ideas about it |
#534