Function mutateCachedValue

  • Mutated cached value

    mutateCachedValue(() => ["user", props.id], (prev) => {
    return {
    ...prev,
    ...newUserData,
    }
    })

    Will trigger the mutate function on all resources that has the same key

    Description

    https://yonathan06.github.io/solid-cached-resource/modules.html#mutateCachedValue

    Type Parameters

    • S

    • T = any

    Parameters

    • source: S

      reactive data function to toggle the request - key is derived for the value (parsed to string)

    • value: T | ((prev: T) => T)

      The new value for the given key. Can be any data, or a function that provides the previous cached data

    Returns void

Generated using TypeDoc