Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

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

💊 Valtio makes proxy-state simple for React and Vanilla
Go to Latest
function proxySet
import { proxySet } from "https://deno.land/x/valtio@v1.13.2/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