Skip to content

Commit 5eed2fc

Browse files
committed
Use WeakMap to hold proxy map in react
1 parent 325499c commit 5eed2fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export { signal, computed, batch, effect, Signal, type ReadonlySignal };
2424
const Empty = [] as const;
2525
const ReactElemType = Symbol.for("react.element"); // https://github.com/facebook/react/blob/346c7d4c43a0717302d446da9e7423a8e28d8996/packages/shared/ReactSymbols.js#L15
2626
const ReactMemoType = Symbol.for("react.memo"); // https://github.com/facebook/react/blob/346c7d4c43a0717302d446da9e7423a8e28d8996/packages/shared/ReactSymbols.js#L30
27-
const ProxyInstance = new Map<FunctionComponent<any>, FunctionComponent<any>>();
27+
const ProxyInstance = new WeakMap<FunctionComponent<any>, FunctionComponent<any>>();
2828
const SupportsProxy = typeof Proxy === "function";
2929

3030
const ProxyHandlers = {

0 commit comments

Comments
 (0)