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

upgrade to react 16 #18

Merged
merged 5 commits into from
Jun 26, 2018
Merged

upgrade to react 16 #18

merged 5 commits into from
Jun 26, 2018

Conversation

titanew
Copy link
Collaborator

@titanew titanew commented Jun 21, 2018

No description provided.

src/Popover.jsx Outdated
visible: nextProps.visible,
});
static getDerivedStateFromProps(props, states) {
if (('visible' in props) && props.visible !== states.visible) {
Copy link
Member

Choose a reason for hiding this comment

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

这个修改不太正确,原意是 props 不同时,通过 props 生成新的 state,而新的逻辑里,变成了比较新的 props 和老的 state 是否相同,不相同则更新成新的 props,意义不同。应该对 props.visible 在 state 中做拷贝,比较 props 和拷贝版本是否相同。

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

好的。我再修改下

@coveralls
Copy link

coveralls commented Jun 21, 2018

Coverage Status

Coverage increased (+0.2%) to 95.946% when pulling 6fc84b7 on rubyless:master into 2958b49 on uxcore:master.

@eternalsky
Copy link
Member

没啥问题,可以合并发布了

@titanew titanew merged commit 838bc44 into uxcore:master Jun 26, 2018
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.

None yet

3 participants