Error Message
TypeError: responder.scrollResponderScrollTo is not a function. (In 'responder.scrollResponderScrollTo({
x: x,
y: y,
animated: animated
})', 'responder.scrollResponderScrollTo' is undefined)
Solution
I got this error once I try to connect to firebase to implement the signIn function.
And I got the solution from the link at:
In my case, I edited the two functions as below.
You can find the file at '/node_modules/@codler/react-native-keyboard-aware-scroll-view/lib/KeyboardAwareHOC.js file'.
singIn 기능 구현을 위해 firebase에 연결하는 과정에서 위와 같은 에러가 떴다.
이에 대한 해결책을 위에 있는 링크를 통해 찾았다.
나의 경우, 두 가지 함수를 수정하였더니 에러가 해결되었다.
수정할 파일의 위치는 위에 적어두었다.
scrollToPosition = (x: number, y: number, animated: boolean = true) => {
const responder = this.getScrollResponder()
if (!responder) {
return
}
if (responder.scrollResponderScrollTo) {
// React Native < 0.65
responder.scrollResponderScrollTo({ x, y, animated })
} else if (responder.scrollTo) {
// React Native >= 0.65
responder.scrollTo({ x, y, animated })
}
// responder && responder.scrollResponderScrollTo({ x, y, animated })
}
scrollToEnd = (animated?: boolean = true) => {
const responder = this.getScrollResponder()
if (!responder) {
return
}
if (responder.scrollResponderScrollTo) {
// React Native < 0.65
responder.scrollResponderScrollTo({ x, y, animated })
} else if (responder.scrollTo) {
// React Native >= 0.65
responder.scrollTo({ x, y, animated })
}
// responder && responder.scrollResponderScrollToEnd({ animated })
}
LIST
'Computer Programming > React-Native' 카테고리의 다른 글
(React-Native) Project: 로그인 기능(로그인 후 메인페이지에서 뒤로가기 막기) (0) | 2022.08.28 |
---|---|
React-Native Error Case(firebase, module 'idb') (0) | 2022.08.26 |
React-Native Error Case(ViewPropTypes) (0) | 2022.08.26 |
React-Native Error Case(firebase module) (0) | 2022.08.26 |
(React-Native) Project: 로그인 기능(부적절한 input 값 알려주기) (0) | 2022.08.25 |