component not update
I'm trying to build Unovis for Solid, but I'm facing a problem similar to this issue https://github.com/f5/unovis/pull/272#issuecomment-1747767724.
With the code that I commented on, the data only updates when it is in the container; if it's in an individual component, it won't update at all.
I made some changes to try to fix it, but the result was not what I imagined. When the data changes, it should show a morphing animation. In my code, it does this if the data is in the container, but if the data is in the line component, it shows flashing content instead.
Here is my code https://stackblitz.com/edit/github-mievkb?file=src-demo%2Findex.tsx
Hoang Nguyen
StackBlitz
Hngngn - Unovis Solid - StackBlitz
Run Unovis Solid created by Hngngn on StackBlitz
GitHub
feat: Vue 3 support by zernonia · Pull Request #272 · f5/unovis
Update (Sept 22, 2023):
📢 Looks like there's a lot of interest in the Vue integration within the community, so we've released an alpha version 1.3.0-alpha.3 for everyone to test . Any feed...
5 Replies
Have you tried passing the get data (as function) instead of passing the data (as value) into the component props?
https://tanstack.com/table/v8/docs/framework/solid/examples/basic
In tanstack they do with
get data() {
return data()
}
I'm not a solid js expert anyway so I'm just following their implementation instead
Solid TanStack Table Basic Example | TanStack Table Docs
An example showing how to implement Basic in Solid using TanStack Table.
You mean marking
data
as an Accessor
? I don't know how that will help, but I can still log the data when it is updated in the Line component.Yeah I think so, since normally I only pass "defaultValue" as value to the component and I don't really need it to be reactive in any situation, but when you really need reactivity, an accessor should work in many cases
As in solid component are rendered only once, you may not create a new Line on every update but use the build in setters.
Here's an updated version of your stackblitz which also animates smoothly when passing data only to the Line component:
https://stackblitz.com/edit/github-mievkb-gmhchd?file=src-demo%2Findex.tsx