-
-
Notifications
You must be signed in to change notification settings - Fork 839
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
Reactive Data Tutorial #132
Comments
Hi, I changed the dataCollection initialisation from However, I still have the console error: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "chartData" |
Yeah there is a problem with the init of the chart if the data is null. Which is discussed in #122 I will see if I can reproduce the warning. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected Behavior
On data change, reactiveProp will either call update() if only the data inside the datasets has changed or renderChart() if new datasets were added.
Actual Behavior
More information
I tried to run the Example from Reactive Data section but I got this error which seems pretty common. Is the parent not the only one mutating the prop (with this.fillData()) ? So why the error, as I think I am following the one-way data flow (the child component is not modifying the props, only reading it).
Here are the two components
Parent
Child (chart component)
Any idea why I can not run the example from the documentation ?
Thanks!
Environment
The text was updated successfully, but these errors were encountered: