-
Notifications
You must be signed in to change notification settings - Fork 7
Support update loading #2
Comments
What is this? Do you need help with it? |
@aberonni I'm thinking about using typescript rewrite this project, but before it, PR welcome to resolve this issue. Busy with daily work :( |
I'd like to help but I don't understand what the issue is :)
Il Mar 23 Mag 2017, 11:31 Kun Yan <[email protected]> ha scritto:
… @aberonni <https://github.com/aberonni> I'm thinking about using
typescript rewrite this project, but before it, PR welcome to resolve this
issue.
Busy with daily work :(
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABM7cr2r3SqFsOTCJ-uMu1z8HPyZCQLvks5r8qdegaJpZM4Mstlm>
.
|
I think what was meant by this is adding componentWillReceiveProps? componentWillReceiveProps(props) {
if (this.state.options !== props.options) {
this.state.options = this.convertOptions(props.options);
}
} |
@hellofantastic since objects are never strictly equal that |
Riiiight of course , thanks for the insight
…Sent from my iPhone
On Jul 2, 2017, at 5:10 AM, Samuel ***@***.***> wrote:
@hellofantastic since objects are never strictly equal that componentWillReceiveProps will always result in the call to this.convertOptions. So yes, that will accomplish what you want, but it will also result in that convertOptions being called every time. Might as well not even do the equality check, or do a lodash isEqual which may not be worth it for performance, but there probably is very little perf impact anyway on such a small call.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
No description provided.
The text was updated successfully, but these errors were encountered: