itsyoboieltr
itsyoboieltr
Explore posts from servers
SSolidJS
Created by gabriel on 3/7/2024 in #support
How can I only set the ref for an element once it's been inserted into the DOM?
the only solution that worked for me is to migrate my tooltip, and popover components to corvu https://corvu.dev/docs/, which also uses floating-ui, but does not have this issue 😄
47 replies
SSolidJS
Created by gabriel on 3/7/2024 in #support
How can I only set the ref for an element once it's been inserted into the DOM?
btw I did all the things that were mentioned here and it is still not working, so I had to scrap solid-floating-ui from my project 😦
47 replies
SSolidJS
Created by itsyoboieltr on 11/30/2023 in #support
Is there a way to use the <For> component with an array of inputs?
some feedback to the solid team: it could be that I missed this, but this probably should be more emphasized somehow when using stores. I believe all people coming from react will do it like I tried initially lol
4 replies
SSolidJS
Created by itsyoboieltr on 11/30/2023 in #support
Is there a way to use the <For> component with an array of inputs?
TLDR: do not make a deep copy of the whole store and modify the copied array like you would in react, just use the built in helper methods so you do not recreate the whole array on every key press
4 replies
SSolidJS
Created by itsyoboieltr on 11/30/2023 in #support
Is there a way to use the <For> component with an array of inputs?
4 replies
SSolidJS
Created by itsyoboieltr on 11/25/2023 in #support
createStore default value with anonymous function
(it is not a derived state, because I need to be able to set it later, so I also need a setter. It is a store (vs a signal) because it is an array)
6 replies
SSolidJS
Created by itsyoboieltr on 11/25/2023 in #support
createStore default value with anonymous function
btw, to justify the use case: I am getting the queried data from the solid-query cache, and want it to be available as the default state of the store. But this data is not always available of course, it is only available if the cache already has an entry. This is the current solution I ended up doing:
const [rows, setRows] = createStore(
(() => {
const data = queryClient.getQueryData<(typeof query)['data']>(
queryKey(),
);
return data ? doComputation(data) : [];
})(),
);
const [rows, setRows] = createStore(
(() => {
const data = queryClient.getQueryData<(typeof query)['data']>(
queryKey(),
);
return data ? doComputation(data) : [];
})(),
);
6 replies
SSolidJS
Created by itsyoboieltr on 11/25/2023 in #support
createStore default value with anonymous function
thats exactly what I ended up doing, but it looks soo ugly :DD
6 replies
SSolidJS
Created by bradstewart on 11/22/2023 in #support
SolidJS, DXOS and reactivity
are you sure you need memo? I think it should be enough to just put it in a function and call it as is () => ...
5 replies
SSolidJS
Created by undefin3d3 on 10/8/2023 in #support
Problem with bundled UI library
I guess it was bundling the solidjs runtime and that caused some issues
12 replies
SSolidJS
Created by undefin3d3 on 10/8/2023 in #support
Problem with bundled UI library
@vg
12 replies
SSolidJS
Created by undefin3d3 on 10/8/2023 in #support
Problem with bundled UI library
I needed to add:
build: {
...
rollupOptions: { external: ['solid-js'] },
},
build: {
...
rollupOptions: { external: ['solid-js'] },
},
this fixed everything for me somehow
12 replies
SSolidJS
Created by undefin3d3 on 10/8/2023 in #support
Problem with bundled UI library
I got vite bundling to work 😄
12 replies
SSolidJS
Created by undefin3d3 on 10/8/2023 in #support
Problem with bundled UI library
When bundled with rollup, my code fails to bundle.. Do you think there is a way to do it with vite?
12 replies
SSolidJS
Created by undefin3d3 on 10/8/2023 in #support
Problem with bundled UI library
same for me, if I bundle my ui library, it does not work, if I copy the exact same source code into the project, then the same component works...
12 replies
SSolidJS
Created by itsyoboieltr on 10/3/2023 in #support
React.isValidElement(element)
thank you!
3 replies