ref stopped working sometimes after version
See original GitHub issueI used to be able to pass a ref to calendar and extract some data for example like this calendarRef.current?.state.currentMonth
.
In the recent versions of the library, the ref just returns undefined.
Expected Behavior
Expect to be able to get the ref of the calendar
Environment
Please run these commands in the project folder and fill in their results:
react-native-calendars version: 1.1282.0 react-native version: 0.65.1
Here is some simple code that already fails to get the ref.
const calendarRef = useRef<Calendar>(null);
<Calendar
ref={calendarRef}
...
/>
And we can even do something like this, and the inner ref comes back as undefined
<Calendar
ref={ref => console.log('Ref is', ref)}
...
/>
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:31
Top Results From Across the Web
Refrigerator Troubleshooting & Repair - HomeTips
This expert refrigerator troubleshooting and repair advice includes how to fix refrigerator problems such as poor cooling, refrigerator noises, ...
Read more >What Makes a Fridge Stop Working? - Networx
If Your Fridge Has Stopped And The Light is Off As obvious as this sounds, often a fridge shuts down completely because it's...
Read more >Refrigerator Not Cooling: What Can Cause a Fridge to Stop ...
If after checking for different possible causes and troubleshooting your fridge it still isn't cooling properly, then you may have a faulty circuit...
Read more >Fridge Stopped working, how to fix? - YouTube
This is the most common problem with all types of Fridges , from mini fridge to full size fridge.
Read more >Refrigerator Won't Start - Top 6 Reasons & Fixes - YouTube
67K views 2 years ago Refrigerator Troubleshooting ... Reason #1: Run Capacitor: The run capacitor helps the capacitor run after it starts.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Having a similar issue with trying to add a reference to AgendaList and calling
agendaListRef.current.chooseDay()
@KrisLau Yes, you can’t scroll to an item that was not rendered, but the AgendaList’s scroll is handled by the ExpandableCalendar (that’s the whole point), you should not manage it yourself. If you need to change the date, change it in the CalendarProvider’s
date
prop and the date should change in both the calendar and agenda list.