BugiDev / BugiDev/react-native-calendar-strip
Getting Component exception: TypeError: undefined is not an object (evaluating '_this.scroller.scrollToDate') when updateWeekView is called
Open
- Dominant language
- JavaScript
- Stars
- 976
- Forks
- 336
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
My calenderstrip component is as beow:
Upon getting focus on the screen, I am using the ref and calling updateWeekView as below:
useFocusEffect(
React.useCallback(() => {
if (calComp.current) {
calComp.current.updateWeekView(moment().weekday(0));
}
}, []),
);
But, if I comment this out and load the page and uncomment the updateWeekView call and navigate back to the same page, it wont throw this exception.
Contributor guide
Assessment
This issue has not been assessed yet.