febri
solid-transition-group not working inside createRoot
What im trying to do
I want a function that i can call such that i can just inject element where ever i want, this is useful for creating like confirmation. So currently if i want some kind of floating widget that is not always present AKA dynamically show up, im gonna need to create signal and then use that signal to fire <Show />, which is fine for form theyre sometime already huge so adding <Show /> wouldnt be much work. But in the case of simpler things like mere confirmation, i gotta first put that confirmation inside a <Show /> and then create 2 signal one for checking if the element is open and the other for confirmation answer (which is neccessary). and then i gotta make sure that everything is done after that confirmation closed (using effects and such). But now i have made myself a little function to create element outside of the current context so i can just call it where ever.
this is the core function
7 replies
How do i create library?
I have this component that render svg from specified url, i dont see it anywhere library that does this. Id like to publish it but i have zero knowledge on building library? Been searching on google but i didnt find any. If anyone know an guide on how to do this or simply a keyword to search to id be grateful, thanks!
3 replies
Load more button
Heres the scenario, i have signal of an array which hold list of words. Then i show them with <For /> component. Now i dont fetch all words in single fetch, i have "load more" button if you need more word. Now the problem is i dont know how to fetch and push new words to the signal. My initial thought was to put that array of words inside another signal array of pages, then we iterate each page with <For/> and we then iterate each word. The problem was when i fetch more pages everything get re-rendered which cause a blink. How do i get around this? Any suggestion?
11 replies