I'm going to use 'Calender List' of 'react-native-calender', and I'm going to scroll up and down the calendar of the past five months from the current month and show it to the user.
However, errors keep coming out and the rendering on the screen is delayed. Today's date appears to be the same text as '2023-07-12', and then the calendar is rendered.
If you look at the error
VirtualizedList: You have a large list that is slow to update - make sure your renderItem function renders components that follow React performance best practices like PureComponent, shouldComponentUpdate
I think I get this error because there are many elements that are rendered by default, such as the past year and the future year, but I don't know how to prevent re-rendering and prevent text like "2023-07-12 from appearing.
this is my code
import { memo } from 'react';
import { View, Text,} from 'react-native';
import { CalendarList, CalendarListProps } from 'react-native-calendars';
type CustomCalendarProps = {
CalendarListProps: CalendarListProps,
};
export const CustomCalendar = memo(({CalendarListProps}: CustomCalendarProps) => {
return (
<View>
<CalendarList
pastScrollRange={5}
futureScrollRange={0}
/>
</View>
)
})