Comments (3)
@chachaxw
我的解决方法是这样的
const usePatchData =(type)=>{
const [count,setCount]=useState(0);
useEffect(()=>{
// call api on this line
console.log(type);
},[count])
function onRefreshPatchData(){
setCount(pre=>pre+1);
}
return [onRefreshPatchData];
}
const [type,setType]=useState('A');
const [onRefreshPatchData] = usePatchData(type);
onRefresh((toggled) => {
onRefreshPatchData();
}
需要加上一些checking,因为会比较频繁的调用到onRefreshPatchData
from react-native-scrollable-tabview.
@HowardTangHw @itenl 这个问题有解决办法吗?我也碰到了这个问题,感觉是个大坑,useRefreshEndReached 里面所有的方法都有这个问题
from react-native-scrollable-tabview.
@HowardTangHw 我这边有个问题就是,调用 onReachEnd 方法的时候,回调函数执行有点奇怪,本来是加载更多数据,有时候能加载,有时候又加载不出来
from react-native-scrollable-tabview.
Related Issues (9)
- 页面横向滑动时,下划线过渡有点卡顿。 HOT 3
- 请问该组件是否已用于生产环境? HOT 2
- 嵌套Flatlist会有手势冲突的问题 HOT 7
- 即将删除生命周期警告修复 HOT 1
- Question stacks HOT 4
- scrollableTabV.scrollTo is not function HOT 3
- cannot run in web HOT 1
- badge 可以是 stacks item中的属性 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-scrollable-tabview.