import { proxySet } from "https://deno.land/x/valtio@v2.1.1/src/vanilla/utils/proxySet.ts";
proxySet
This is to create a proxy which mimic the native Set behavior. The API is the same as Set API
Examples
import { proxySet } from 'valtio/utils'
const state = proxySet([1,2,3])
// can be used inside a proxy as well
const state = proxy({
count: 1,
set: proxySet()
})
import { proxySet } from 'valtio/utils' const state = proxySet([1,2,3]) // can be used inside a proxy as well const state = proxy({ count: 1, set: proxySet() })
Parameters
optional
initialValues: Iterable<T> | null