uchiha_savior
cant set signal exported from a context
I've recreated a simple example based on my code: https://stackblitz.com/edit/solidjs-templates-dhbcft?file=src%2Fcomponents%2Fcontext.tsx,src%2Fcomponents%2FCardWrapper.tsx
In
context.tsx
I have a signal inTransit
which tells if some HTTP request is in progress. It works fine in the submit
function which is in the context, but when I use setInTransit
in a createEffect
in another component (CardWrapper.tsx
), it does not works as expected.
What I expect is to keep seeing "Processing..." till the createEffect
in CardWrapper.tsx
is also done executing after clicking the submit button.
Any help or hints would be appreciated, thanks!6 replies
Derived value in event handler causing router error
Error: Make sure your app is wrapped in a <Router /> when calling an eventhandler. Just trying to log a derived signal/prop in my
buy
function. The values from product()
get printed correctly in my DOM
The second console.log
works fine. But the first throws
8 replies