From bdd4152017c19524850e3a86eaecf6568bbfb944 Mon Sep 17 00:00:00 2001 From: chrisnojima Date: Wed, 18 Jan 2023 15:51:04 -0500 Subject: [PATCH] default freeze on immer for perf (#25438) * remove diasbling freeze * lint --- shared/util/container.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/shared/util/container.tsx b/shared/util/container.tsx index a20897dd572e..ccff3b3600ff 100644 --- a/shared/util/container.tsx +++ b/shared/util/container.tsx @@ -1,5 +1,5 @@ import * as React from 'react' -import {type Draft as _Draft, setAutoFreeze} from 'immer' +import {type Draft as _Draft} from 'immer' import type {TypedActions as _TypedActions} from '../actions/typed-actions-gen' import type {ActionHandler as _ActionHandler} from './make-reducer' import type {TypedState as _TypedState} from '../constants/reducer' @@ -20,11 +20,6 @@ import USH from './use-selector' const useSelector = USH.useSelector as TypedUseSelectorHook -// don't pay for this in prod builds -if (!__DEV__) { - setAutoFreeze(false) -} - export const networkErrorCodes = [ StatusCode.scgenericapierror, StatusCode.scapinetworkerror,