Add displayName to contexts (#8814)
This commit is contained in:
Vendored
+2
@@ -7,9 +7,11 @@ type StateContext = Map<string, boolean>
|
||||
type SetStateContext = (uri: string, value: boolean) => void
|
||||
|
||||
const stateContext = React.createContext<StateContext>(new Map())
|
||||
stateContext.displayName = 'ThreadMutesStateContext'
|
||||
const setStateContext = React.createContext<SetStateContext>(
|
||||
(_: string) => false,
|
||||
)
|
||||
setStateContext.displayName = 'ThreadMutesSetStateContext'
|
||||
|
||||
export function Provider({children}: React.PropsWithChildren<{}>) {
|
||||
const [state, setState] = React.useState<StateContext>(() => new Map())
|
||||
|
||||
Reference in New Issue
Block a user