Comments (2)
Thanks for the detailed report, it sounds like there are two issues at hand.
The first is that you don't have access to the actual Error object. Usually we'd expose it some way (ex: via an onLoadError
prop) but in this specific case you can add error handling in your onLoadMoreAsync
prop. The only other errors would be due to implementation bugs in InfiniteScrollView, which we expect not to exist but if they do (that's reality) we at least want to see them, hence the console.error
call. So I don't think there's anything to change here.
The second problem is that console.error(error)
prints out useless info because of how React Native serializes errors. My suggestion is to send a PR to React Native to make the console error logging more like V8's. The place to do that is here: https://github.com/facebook/react-native/blob/0dd93b62b4d1f6e570274eb7b3d7f5f557a3ea20/packager/react-packager/src/Resolver/polyfills/console.js#L379. That way all libraries and not just this one can fix the issue you reported.
from react-native-infinite-scroll-view.
The only other errors would be due to implementation bugs
For example, if I have some syntax error in renderLoadingErrorIndicator
or in onLoadMoreAsync
(e.g., something was not imported), the error will be catched by InfiniteScrollView, hiding any useful information regarding the actual error.
I agree that a better console.error logging would to the trick. Currently, I can see that the output log (react-native log-android/log-ios) displays correctly the error, thanks to the formatError
function used in console.js. However, the red screen of death message is slightly different and does not include the result of formatError
.
from react-native-infinite-scroll-view.
Related Issues (20)
- ReactComponent is not defined HOT 4
- A complete example? HOT 5
- Why does it need to manually calculate when end is reached? HOT 1
- Scrolling broken - Please check the fix HOT 3
- Complete Example showing all available events and properties ? HOT 15
- Can't scroll: Adding a ListView as the only child of the Scroll View snaps the lists scroll offset to the top.
- No verbose Documentation, No example. how to implement? HOT 2
- DefaultLoadingIndicator not working on loading more, any idea? HOT 3
- Infinite scroll does not work for off-screen elements HOT 2
- Incremental list view
- Support infinite scroll in both directions HOT 5
- Does the release of FlatList change anything with this package?
- scrollToEnd support
- loading icon on the bottom when loadMoreAsync works HOT 4
- Possibility for commenting the example code?
- Not entirely sure how to use this HOT 1
- onLoadMoreAsync and isLoading relationship
- scrollTo is not a function
- Typescript types HOT 1
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-infinite-scroll-view.