M7
M7
SSolidJS
Created by navi.ToTskie on 10/11/2023 in #support
help
usually you do that differently in frameworks.. something like:
const [html, setHtml] = createSignal(null);
const onClick = function onButtonClick() {
const students = await (await fetch(...)).json();
setHtml(<table ..../>);
}
return <main...>
...
{html()}
...
</main>
const [html, setHtml] = createSignal(null);
const onClick = function onButtonClick() {
const students = await (await fetch(...)).json();
setHtml(<table ..../>);
}
return <main...>
...
{html()}
...
</main>
something like this, there are also other patterns with createResource etc. But ur also calling print, so not sure what exactly your trying to accomplish.. may be rendering html in an iframe and printing content of iframe is what you are looking for?.. idk what is your task..
9 replies
SSolidJS
Created by navi.ToTskie on 10/11/2023 in #support
help
i see..
9 replies
SSolidJS
Created by navi.ToTskie on 10/11/2023 in #support
help
so you have button with onClick and by clicking on the button you want to do what?
9 replies
SSolidJS
Created by navi.ToTskie on 10/11/2023 in #support
help
what is "RightDesign" component?
9 replies
SSolidJS
Created by navi.ToTskie on 10/11/2023 in #support
can anyone give me a scenario in when to use createresouce : refetch and mutation
createResource returns 2 functions: 1) mutate 2) refetch. Difference is that "mutate" just updates the signal value, like calling "setSignal" (so no http call is made as far as i understood), wheres "refetch" executes last request (http call) that was made again.. most probably you had error in getUserTotal function when it accepts first argument as emty string.. what error did u had when you where calling refetch?
3 replies
SSolidJS
Created by vik on 10/11/2023 in #support
How to array.filter Signal with array and pass down as Signal
cos "options" is a getter? i.e you should call it like const optionsMemo = createMemo(() => options()); i guess..
16 replies