Add displayName to contexts (#8814)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React, {createContext, useContext, useMemo} from 'react'
|
||||
import {ScrollHandlers} from 'react-native-reanimated'
|
||||
import {createContext, useContext, useMemo} from 'react'
|
||||
import {type ScrollHandlers} from 'react-native-reanimated'
|
||||
|
||||
const ScrollContext = createContext<ScrollHandlers<any>>({
|
||||
onBeginDrag: undefined,
|
||||
@@ -7,6 +7,7 @@ const ScrollContext = createContext<ScrollHandlers<any>>({
|
||||
onScroll: undefined,
|
||||
onMomentumEnd: undefined,
|
||||
})
|
||||
ScrollContext.displayName = 'ScrollContext'
|
||||
|
||||
export function useScrollHandlers(): ScrollHandlers<any> {
|
||||
return useContext(ScrollContext)
|
||||
|
||||
Reference in New Issue
Block a user