react-native-calendars icon indicating copy to clipboard operation
react-native-calendars copied to clipboard

Agenda Crashes the App After Expo 53 Upgrade;

Open guximii opened this issue 6 months ago • 8 comments

I had a simple implementation of Agenda that was working perfectly before upgrading to Expo 53. However, after the upgrade, it's now crashing the app with the following error:

ERROR Warning: Error: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.

Image

To fix the crash, I tried the changes from this PR: wix/react-native-calendars#2622. The crash is now resolved, but the Agenda component still isn’t behaving as expected.

-The month view appears expanded by default, without the user clicking the knob. -Scrolling is disabled on this screen. -The knob doesn’t respond, so I can't close the calendar view either.

import { Agenda, CalendarProvider } from 'react-native-calendars';



 <CalendarProvider showTodayButton date={todayDate}>
        <Agenda
          firstDay={1}
          key={agendaKey}
          showClosingKnob
          onDayPress={(item) => {
            setSelectedDate(item.dateString);
          }}
          scrollEnabled={true}
          items={agendaData || {}}
          selected={selectedDate}
          showOnlySelectedDayItems
          renderItem={renderItem}
          renderEmptyData={isLoading ? renderLoadingDate : renderEmptyDate}
          renderEmptyDate={renderEmptyDate}
          rowHasChanged={rowHasChanged}
          renderKnob={() => <View style={styles.knob}></View>}
          theme={{
            backgroundColor: 'blue',
            selectedDotColor: 'white',
            selectedDayBackgroundColor: theme.darkColors?.primary,
            dotColor: theme.darkColors?.primary,
          }}
        />
      </CalendarProvider>

Platform: iOS & Android versions: { "expo": "^53.0.17", "react-native-calendars": "^1.1313.0", }

guximii avatar Jul 11 '25 14:07 guximii

Aqui também esta a mesma coisa.

mateusdata avatar Jul 16 '25 03:07 mateusdata

Does this work? https://github.com/wix/react-native-calendars/pull/2664

ssunday avatar Jul 17 '25 14:07 ssunday

Does this work? #2664

Unfortunately, it doesn't.

guximii avatar Jul 24 '25 06:07 guximii

Use patch-package to apply this patch (version 1.1313.0):

react-native-calendars+1.1313.0.patch

It works!

dangthequan avatar Jul 29 '25 07:07 dangthequan

Spot on @dangthequan! if you don't mind let me open a pull request.

https://github.com/wix/react-native-calendars/pull/2713

raeiny0day avatar Jul 30 '25 09:07 raeiny0day

Spot on @dangthequan! if you don't mind let me open a pull request.

#2713

ok, thank you.

dangthequan avatar Jul 31 '25 02:07 dangthequan

Works great!

ssunday avatar Aug 18 '25 14:08 ssunday

Use patch-package to apply this patch (version 1.1313.0):

react-native-calendars+1.1313.0.patch

It works!

It works! thank you.

yurun0731 avatar Nov 04 '25 07:11 yurun0731