Skip to content
An implementation of React Native's RefreshControl for web, since react-native-web does not provide one at the moment
JavaScript
Branch: master
Clone or download
Latest commit acf556c Dec 21, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.eslintignore
.eslintrc.js
.gitignore
.prettierrc
LICENSE
README.md
example.gif
package-lock.json First commit Oct 2, 2019
package.json

README.md

react-native-web-refresh-control NPM Version

Drop-in RefreshControl component for web

Install

npm i react-native-web-refresh-control

Example

https://snack.expo.io/@niciusb/refreshcontrol-example

Usage

react-native-web-refresh-control exports two properties:

  • patchFlatListProps is a function that you'll want to call at some point, while loading your app. It replaces the default value of the refreshControl prop of FlatList

  • RefreshControl can be used to easily give ScrollView a pull-to-refresh functionality, just like the RefreshControl exported from react-native. However, if you used the RefreshControl from react-native, it would not work on the web. To see how to do this, check out this snack: https://snack.expo.io/@niciusb/refreshcontrol-example

patchFlatListProps Example

// index.js
import { patchFlatListProps } from 'react-native-web-refresh-control'

import App from './App'

patchFlatListProps()
registerRootComponent(App)
You can’t perform that action at this time.