SolidJSS
SolidJSโ€ข3y agoโ€ข
11 replies
Abrinzer

Trigger same API call with different payloads in parallel using CreateResource

I am facing issues with making same API call multiple times with different payloads (using ForEach). I am setting a payload within the store at each iteration and that store proxy is used as a dependency of fetcher function inside createResource
export const TriggerAPI = () => { const [dummy] = createResource(getPayload, fetcher); return dummy; };

getPayload is return values from store. I verified that it is updating each time in loop but API is triggering only once. Can someone help what should be the ideal way to handle it
Was this page helpful?