joalisonx
joalisonx
SSolidJS
Created by joalisonx on 7/24/2023 in #support
createResource returns undefined
Hello, goodnight everyone. Im having a problem using createResource. This function returns me undefined whenever I try to log it (console.log(data())). I tested to see that this wasn't an issue in my API by logging the response in the fetcher function and everything was as expected. The strangest thing is that I can normally render the result of this resource even though it is undefined.
const [data] = createResource(getGames);
<For each={data()}>{game => (<Game {...game}/>)}</For>
const [data] = createResource(getGames);
<For each={data()}>{game => (<Game {...game}/>)}</For>
6 replies