SolidJSS
SolidJSโ€ข3y agoโ€ข
4 replies
victoraalvarez

Uncaught ReferenceError: createDeepSignal is not defined

Not really sure what I'm doing wrong here. I definitely have SolidJS >v1.5 and I'm using a close copy of the documentation example. Do I need to manually create createDeepSignal? I feel like I'm making a silly error somewhere in here haha. Any help would be greatly appreciated! My code is below:

import { createResource, createSignal } from "solid-js";
import { createStore } from "solid-js/store";

const fetchData = async (path: string): Promise<any> => {
    return await(
        await fetch(path)
    ).json();
}

const [resource] = createResource(fetchData, {
    storage: createDeepSignal
});

export const getData = () => [resource];
Was this page helpful?