Skip to content

Commit

Permalink
default freeze on immer for perf (#25438)
Browse files Browse the repository at this point in the history
* remove diasbling freeze

* lint
  • Loading branch information
chrisnojima authored Jan 18, 2023
1 parent 438fbd6 commit bdd4152
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions shared/util/container.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -20,11 +20,6 @@ import USH from './use-selector'

const useSelector = USH.useSelector as TypedUseSelectorHook<RootState>

// don't pay for this in prod builds
if (!__DEV__) {
setAutoFreeze(false)
}

export const networkErrorCodes = [
StatusCode.scgenericapierror,
StatusCode.scapinetworkerror,
Expand Down

0 comments on commit bdd4152

Please # to comment.