-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Fix data functions being called twice. (fix #2687) #2689
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
Conversation
@vuejs/collaborators Anyone with any opinions why |
20d4382
to
d8dd5bd
Compare
@blake-newman |
@kazupon so i guess i can remove my test for the warnings... However tests pass fine if not using Seems slightly flawed for recalling data function for warning on dev, as could incur different results in production/development. However, this no longer acts as so in current code, so it's a matter of what |
- Added test for checking prop to data clash - Added test to ensure data function is only called once per strut - Removed this._runtimeData uses 'data' for prop to data clash check
d8dd5bd
to
c061640
Compare
Hey, I have been asking about this question on various sites trying to find why my |
@dargue3 No, it's not. It should only be fired once 😄 |
@posva well at least I know I'm not crazy. Interesting how it has taken this long for anyone to notice... Or am I just the only one sending AJAX requests in my Like I said, through trial-and-error I found that this bug was introduced in |
@dargue3 You might not be the only one but you shouldn't do that 😖 Thanks for reporting that @dargue3 |
This was partially a dirty workaround to allow passing values for props in the So now I've introduced a dedicated option |
I don't understand the purpose of the new |
@YerkoPalma |
@YerkoPalma default values are the same for every instance created. e.g. instead of first registering and rendering a parent instance with: <test :data="123"></test> You can just new Test({
propsData: {
data: 123
}
}) This is mostly about facilitating easier unit tests for components, not something you'd use very often in application code. |
I see. Everything that help on tests is fine 😄 Thanks for the answer. |
👍 makes sense |
That was fast 👍 |
Fixes: ISSUE-2687