
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
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 64 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.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.