Skip to content

Commit bdd4152

Browse files
authored
default freeze on immer for perf (keybase#25438)
* remove diasbling freeze * lint
1 parent 438fbd6 commit bdd4152

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

‎shared/util/container.tsx‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react'
2-
import {type Draft as _Draft, setAutoFreeze} from 'immer'
2+
import {type Draft as _Draft} from 'immer'
33
import type {TypedActions as _TypedActions} from '../actions/typed-actions-gen'
44
import type {ActionHandler as _ActionHandler} from './make-reducer'
55
import type {TypedState as _TypedState} from '../constants/reducer'
@@ -20,11 +20,6 @@ import USH from './use-selector'
2020

2121
const useSelector = USH.useSelector as TypedUseSelectorHook<RootState>
2222

23-
// don't pay for this in prod builds
24-
if (!__DEV__) {
25-
setAutoFreeze(false)
26-
}
27-
2823
export const networkErrorCodes = [
2924
StatusCode.scgenericapierror,
3025
StatusCode.scapinetworkerror,

0 commit comments

Comments
 (0)