phungleson
Attempting to access a stale value from <Show>...
Hi peeps,
I have a rather complex application with lots of stores and recently have this issue.
It would be helpful if solid can show me where the issue is? or a way to debug it further.
Cheers,
2 replies
Vitest 0.34.4 caused `You appear to have multiple instances of Solid`
Hi peeps, I recently upgraded vitest from
0.34.2
to 0.34.4
and it starts showing for every single test:
I understand what it means and I am sure I have only 1 version of solid, but I don't know enough to go around to debug this further.
I wonder if there is a way get more information to debug this. Vitest 0.34.2
doesn't show that issue.
I am using
Thanks,13 replies
Reactivity does not flow through nested structure and <For />
Hey peeps,
I am building a nested structure and it is probably easier to look at the example here
https://playground.solidjs.com/anonymous/6b5977b6-6709-413a-93b6-d9cae938b4e7
I expects the result to be
015
but get 012
instead
Not sure if anyone might know why updated order doesn't not reflect correctly inside <For />
Thanks,6 replies
Reactive in case of dynamic data
Hey peeps, I have an object where it can be any random json.
Something like this, https://playground.solidjs.com/anonymous/8670f306-cea1-40d4-9a84-3dbc2caa305f
It looks like Solid will lose the object reactivity when changing from array to object, vice versa.
I wonder if there is a way to overcome this?
5 replies
Handle union type in store
Hi peeps,
I would like to store union type like this
type Post = NewPost | DeletedPost;
in a store.
https://playground.solidjs.com/anonymous/7210c31b-5730-4e51-b875-3d8e2f36af4c
It seems to work but I wonder if there is a way to tell solid more about the types and avoid type check errors?
Thanks!4 replies
Stricter JSX?
Hey peeps,
I recently upgraded to 1.7.0 and seems like there is new stricter JSX.
I read the CHANGELOG and understand the issue a bit, i.e. removing function form from JSX.Element.
How ever my code (especially in test) use function form quite a bit, like this.
What should I do make it works without changing too much code?
Thanks!
6 replies
onfocus or onFocus or onFocusIn?
It is probably not solid issue, but not sure which one to use.
I upgraded latest
solid-js
and onFocus
seems to be gone, not sure if it was even there before?
I tried to use onFocusIn
but it seem to work with playwright
but not vitest
i.e. fireEvent.focus
?
I tried to use onfocus
and it works well but it seems like generic html even handler, which is a bit out of place in middle of JSX.
I wonder how everyone handle this case?25 replies
How to make Signal/Resource do incremental update
Hey peeps,
My app is a bit evolving and it ended up something like this:
https://playground.solidjs.com/anonymous/149dc5aa-a5f4-482e-85ad-727f9f0c2086
I would like to press button and both resource and message updated.
I used to use store instead of resource and it works fine. But I would like to move to resources to make use of its functionalities.
With current resource code, the whole resource get replaced and message is gone. I wonder whether there is a way to make this work?
Cheers,
4 replies
Vite v4 and You appear to have multiple instances of Solid
Hey peeps,
I am trying to upgrade my app to vite v4, however it ran into the error in header.
The error is clear and I understand what it means. However, I couldn't pin point which part of the app/libs caused the issue.
Strangely enough, it was running fine in Vite v2 and v3.
It would be great if someone has any thoughts how to debug this?
I am using latest of a few libs:
"solid-jest": "^0.2.0",
"solid-js": "^1.6.5",
"vite-plugin-solid": "^2.4.0"
"babel-preset-solid": "^1.6.2",
"solid-app-router": "^0.4.2",
Cheers!6 replies