Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
nuke-refresh-control
Advanced tools
RefreshControl 是一个能够实现下拉刷新的子组件,且父组件只能是 <Scrollview>
或 <ListView>
。
// 完整 demo 请参考 ScrollView 组件的 Demo
//初始 state
constructor() {
super();
this.state={
isRefreshing: false,
refreshText: '↓ 下拉刷新',
data:[
//...省略部分代码
]
}
}
handleRefresh =()=>{
this.setState({
isRefreshing: true,
refreshText: '加载中',
});
// mock ajax 此处替换为你的 ajax 请求
setTimeout(() => {
this.setState({
isRefreshing: false,
data: [
// data 字段变更
],
refreshText: '↓ 下拉刷新',
});
}, 1000);
}
render(){
return(
<ScrollView>
<RefreshControl isRefreshing={this.state.isRefreshing} style={{width:750,height:100}} onRefresh={this.handleRefresh}>
<Text>{this.state.refreshText}</Text>
</RefreshControl>
{/* 此处为你的内容区域 */}
<ScrollView>
)
}
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
isRefreshing | 是否展示 | false | |
onRefresh | refresh 事件 | Function | |
style | 样式,必须声明宽高否则可能无法展示 | object |
FAQs
The npm package nuke-refresh-control receives a total of 6 weekly downloads. As such, nuke-refresh-control popularity was classified as not popular.
We found that nuke-refresh-control demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.