Comments (14)
FWIW, PR #70 doesn't fix this.
from react-native-swipeable-list.
Ok, I have a repro 😄
from react-native-swipeable-list.
@esthor I applaud your PR #74 efforts!
I've gotten refs to the swipeable flatlist to work, but the app just tanks in terms of performance.
Where is this work, or is it too tacky to commit? :-)
from react-native-swipeable-list.
Hey @jkoutavas! I think it's because this library isn't currently exporting TypeScript type definitions. Does it work functionally and just complain about the type?
Basically, I think your setup and usage could be fine, but TypeScript will throw this error (likely) because your TypeScript compiler is saying "Hey! What a minute...I'm inferring an any
type on anything that I don't have a type definition or can infer from the code, and specific things like scrollToEnd()
isn't part of the any
type."
Does that make sense?
I've really been meaning to add those type definitions. I was hoping to move this community PR along (#61), which would likely solve this for your case. If you'd like to reopen it and address the issues to get it ready, I'd greatly appreciate it! Otherwise, I can try to get around to it 🙏
from react-native-swipeable-list.
Thank you for the reply.
Were it just a typing issue, I wouldn't have minded. But, the error is deeper than that...
ERROR TypeError: _flatlistRef$current.scrollToEnd is not a function (it is undefined), js engine: hermes
... happens at runtime when attempting to scroll to bottom. And of course the scroll doesn't happen.
As far as that PR goes, sure, I'll re-open it, address the issues. But, I might need your help/further insights on understanding the issue I raised here.
For what it's worth, I'm on latest RN v0.72.5 along with accompanying React v18.2.0.
from react-native-swipeable-list.
Oh. I see. That's not great.
If you use FlatList from react-native, it works fine?
I have not tested on the latest version of React Native yet, so I'm wondering if that's going to be an issue. 🤔 😅
from react-native-swipeable-list.
Yeah, it works fine with FlatList. I'm trying to move my current implementation from it to SwipeableFlatList.
from react-native-swipeable-list.
Ok, I may need to update this library to specifically use the latest FlatList version. Starting to test now...
from react-native-swipeable-list.
TL;DR -- adding refs on refs is instantly janky 😭
Ok, so I've given it the old college try. And I'm at a point where it might make sense to refactor the library in order to support refs on top of it in a performant way.
What I've done:
- I've refactored the library to TS (to make everyone's life easier, including mine 😅 )
- I've updated the example app
- I've gotten refs to the swipeable flatlist to work, but the app just tanks in terms of performance.
I am at the point where I need to step back and think a bit more about what's the best path forward. Right now, I don't think there is a quick way to get refs to work for you that I'm seeing.
I'll come back in a week or so to try again. 😕
from react-native-swipeable-list.
TL;DR -- adding refs on refs is instantly janky
Yeah. Is there an approach to expose the underlying FlatList ref as a property to SwipeableFlatList? Or am I being naive?
from react-native-swipeable-list.
Where is this work, or is it too tacky to commit? :-)
Lol, yeah, pretty tacky to commit right now. I'm going to have another go at it.
Is there an approach to expose the underlying FlatList ref as a property to SwipeableFlatList?
Yeah, that's likely how I'll need to refactor how I was doing it. Larger context was that I was in the middle of a complete JS/FlowTypes -> TypeScript and Class->Function component rewrite when doing this. 😁 So there was a lot of change not fully tested at the time.
"Soon" 🙏
from react-native-swipeable-list.
@esthor I'm very appreciative that you are actively working on this. This package has been my go-to (pun intended) for a number of projects I've done. Let me know if there's anything more I can do to help.
from react-native-swipeable-list.
@esthor Happy Holidays. Any news to share?
from react-native-swipeable-list.
This issue has not had activity for 45 days. It will be closed in 10 days if there continues to be no activity.
from react-native-swipeable-list.
Related Issues (9)
- Change Swiping Direction HOT 2
- Does it support Expo and TypeScript? HOT 2
- Define Types HOT 2
- Refactor to Native Animations (w/ Reanimated) HOT 1
- Refactor to Native Gesture Handling (w/ React Native Gesture Handler) HOT 1
- disable bounce HOT 7
- Does this library still work? HOT 2
- Close the swipeable HOT 11
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-swipeable-list.