Unblock React Compiler for 23 components across ten small causes (#11542)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -64,12 +64,6 @@ export function Pager({
|
||||
const dragProgress = useSharedValue(selectedPage)
|
||||
const dragState = useSharedValue<'idle' | 'dragging' | 'settling'>('idle')
|
||||
|
||||
useImperativeHandle(ref, () => ({
|
||||
setPage: (index: number) => {
|
||||
onTabBarSelect(index)
|
||||
},
|
||||
}))
|
||||
|
||||
const onTabBarSelect = useCallback(
|
||||
(index: number) => {
|
||||
const scrollY = window.scrollY
|
||||
@@ -104,6 +98,12 @@ export function Pager({
|
||||
[selectedPage, setSelectedPage, onPageSelected, onTabPressed],
|
||||
)
|
||||
|
||||
useImperativeHandle(ref, () => ({
|
||||
setPage: (index: number) => {
|
||||
onTabBarSelect(index)
|
||||
},
|
||||
}))
|
||||
|
||||
return (
|
||||
<View testID={testID} style={s.hContentRegion}>
|
||||
{renderTabBar({
|
||||
|
||||
Reference in New Issue
Block a user