Skip to content

ExpandableCalendar sometimes does not render after receving push notificationsΒ #2693

@EttoreFranchi

Description

@EttoreFranchi

Hello,

I have this simple component in my React Native Expo 52 application:

import React, { useEffect } from 'react';
import { ExpandableCalendar, CalendarProvider } from 'react-native-calendars';
import { LayoutAnimation } from 'react-native';

export default function CalendarVisualization({ date, setDate }) {
  useEffect(() => {
    LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
  }, []);

  return (
    <CalendarProvider
      date={date}
      onDateChanged={(date) => setDate(new Date(date))}
    >
        <ExpandableCalendar
          firstDay={1}
        />
    </CalendarProvider>
  );
}

When I click on an expo push notification the app gets reloaded and ExpandableCalendar sometimes fails to render. Although it is completely transparent, it is still interactable (so I can still change the selected day, week etc).

I am using react-native-calendars 1.1312.1.

The component does not log nor throw any error.

It there something I'm doing wrong?
Thanks for the help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions