Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/valtio/src/vanilla/utils/proxySet.ts>proxySet

🧙 Valtio makes proxy-state simple for React and Vanilla
Latest
function proxySet
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() })

Parameters

optional
initialValues: Iterable<T> | null