SolidJSS
SolidJSβ€’3y agoβ€’
5 replies
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!
StackBlitz
Vite + solid templates
Solid InProgress Bug - StackBlitz
Was this page helpful?