Add displayName to contexts (#8814)
This commit is contained in:
@@ -4,7 +4,9 @@ type StateContext = boolean
|
||||
type ApiContext = (hasNew: boolean) => void
|
||||
|
||||
const stateContext = React.createContext<StateContext>(false)
|
||||
stateContext.displayName = 'HomeBadgeStateContext'
|
||||
const apiContext = React.createContext<ApiContext>((_: boolean) => {})
|
||||
apiContext.displayName = 'HomeBadgeApiContext'
|
||||
|
||||
export function Provider({children}: React.PropsWithChildren<{}>) {
|
||||
const [state, setState] = React.useState(false)
|
||||
|
||||
Reference in New Issue
Block a user