question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request

The ability to pull the bottom sheet down when it is in its default position and trigger reload of Flatlist/Sectionlist.

Why it is needed

Very common action to refresh a list by pulling the list down.

Code sample

I have tempted something like having three snap points, the lowest for the data fetching.

   const handleSheetChange = useCallback(async index => {
      if (index === 0) {
         // shows the ActivityIndicator and sets a state that is used to locking the bottom sheet
         setFetchingScreen(true);
  
       await fetchData()
  
       setFetchingScreen(false);

        // Move the sheet to original place when data has been fetched
         sheetRef.current?.snapTo(1);
      }
   }, []);

But it is slow and pretty buggy. Any suggestions of how it would be best to achieve this?

Best regards and thank you for a great library!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
gorhomcommented, Jul 6, 2021

pull to refresh will be available on v4 #427

1reaction
Angelk90commented, Jul 5, 2021

@gorhom : are there any news?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Home Pull To Refresh
Verified reversal of greenhouse gas emissions. • Simple monthly subscription. Cancel any time. • Share your climate dedication page with friends. Reverse ...
Read more >
Pull-to-refresh - Windows apps | Microsoft Learn
Pull-to-refresh lets a user pull down on a list of data using touch in order to retrieve more data. Pull-to-refresh is widely used...
Read more >
Pull to refresh design pattern
As the pull-to-refresh gesture signifies a manual request for updates, it requires a user involvement into the process and creates a superficial layer...
Read more >
React Native Pull-to-Refresh: Make Refreshing Easy for Users
Pull-to-refresh is a touchscreen gesture that retrieves all the latest data and updates the currently available data in the app. You initiate it ......
Read more >
Pull to Refresh UI Pattern. by Nick Babich - UX Planet
The pull-to-refresh (or swipe-to-refresh) pattern lets a user pull down on a list of data using touch in order to retrieve more data....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found