-
Notifications
You must be signed in to change notification settings - Fork 966
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
fix(hippy-react-web): fixed image newProps src unRendered problem #472
fix(hippy-react-web): fixed image newProps src unRendered problem #472
Conversation
…ooo/Hippy into fix/hippy-react-web-image
Codecov Report
@@ Coverage Diff @@
## master #472 +/- ##
=======================================
Coverage 59.42% 59.42%
=======================================
Files 25 25
Lines 1676 1676
=======================================
Hits 996 996
Misses 680 680 Continue to review full report at Codecov.
|
@@ -100,6 +100,8 @@ export class Image extends React.Component { | |||
super(props); | |||
this.state = { | |||
isLoadSuccess: false, | |||
imageUrl: props.source ? props.source.uri : '', | |||
prevImageUrl: props.source ? props.source.uri : '', |
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.
props.source ? props.source.uri : '' 重复了写了两次,可以精简圈复杂度
* fix(hippy-react-web): fixed image newProps src unRendered problem * fix(hippy-react-web): fixed eslint problem * fix(hippy-react-web): use getDerivedStateFromProps replace componentWillReceiveProps * fix(hippy-react-web): life cycle replace * chore(hippy-react-web): optimize the code
…ncent#472) * fix(hippy-react-web): fixed image newProps src unRendered problem * fix(hippy-react-web): fixed eslint problem * fix(hippy-react-web): use getDerivedStateFromProps replace componentWillReceiveProps * fix(hippy-react-web): life cycle replace * chore(hippy-react-web): optimize the code
Before submitting a new pull request, please make sure: