
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-refresher
Advanced tools
npm:
npm install --save react-refresher
yarn:
yarn add react-refresher
ES6
import Refresher from 'react-refresher'
ES5
var Refresher = require('react-refresher').default
class MyList extends React.Component {
constructor (props, ctx) {
super(props, ctx)
...
this.onRefresh = this.onRefresh.bind(this)
this.state = {
...
articles: []
}
}
...
onRefresh () {
return fetch('http://sample.api/article')
.then(res => res.json())
.then(articles => this.setState({ articles }))
}
render () {
return (
<Refresher onRefresh={this.onRefresh}>
...
</Refresher>
)
}
}
| Prop | Type | Required? | Default | Notes |
|---|---|---|---|---|
| onRefresh | () => Promise | Yes | The promise should resolve when the re-fetching is complete, or reject on error | |
| loadingHeight | any | No | 70 | Can be any value valid for the height style prop in React |
| animationTime | number | No | 500 | Length of the refresher hiding animation, in milliseconds |
| className | String | No | '' | This is applied to the entire refresher area (including content area) |
| downArrow | JSX.Element | No | '↓' | Can also just be a string |
| upArrow | JSX.Element | No | '↑' | Can also just be a string |
| errorIcon | JSX.Element | No | '✖' | Can also just be a string |
| successIcon | JSX.Element | No | '✔' | Can also just be a string |
| spinner | JSX.Element | No | 'Loading...' | Can also just be a string |
| refreshBackground | String | No | 'none' | Can be any CSS value that is appropriate for the background prop |
| refreshColor | String | No | 'currentColor' | Can be any CSS value that is appropriate for the color prop |
| CSS class | Used for |
|---|---|
| pull-to-refresh | The entire refresher, around the loader and content |
| loader | The loader, used to render the up arrow, down arrow, spinner, success, and failure icons |
| content | The content area, where the children of the refresher are rendered |
FAQs
A pull-to-refresh component for react
The npm package react-refresher receives a total of 5 weekly downloads. As such, react-refresher popularity was classified as not popular.
We found that react-refresher demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.