M7
help
usually you do that differently in frameworks..
something like:
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
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