Add displayName to contexts (#8814)

This commit is contained in:
Samuel Newman
2025-08-14 01:12:31 +03:00
committed by GitHub
parent 275fece3e3
commit b2c56cbd6d
89 changed files with 173 additions and 28 deletions
+2
View File
@@ -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())