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
+3 -2
View File
@@ -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)