Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
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@v2.0.0-beta.5/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