BugiDev / BugiDev/react-native-calendar-strip

Getting Component exception: TypeError: undefined is not an object (evaluating '_this.scroller.scrollToDate') when updateWeekView is called

Open
#295 0 comments 5 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.