Giter VIP home page Giter VIP logo

Comments (14)

jkoutavas avatar jkoutavas commented on July 20, 2024 1

FWIW, PR #70 doesn't fix this.

from react-native-swipeable-list.

esthor avatar esthor commented on July 20, 2024 1

Ok, I have a repro 😄

from react-native-swipeable-list.

jkoutavas avatar jkoutavas commented on July 20, 2024 1

@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.

esthor avatar esthor commented on July 20, 2024

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.

jkoutavas avatar jkoutavas commented on July 20, 2024

@esthor

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.

esthor avatar esthor commented on July 20, 2024

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.

jkoutavas avatar jkoutavas commented on July 20, 2024

Yeah, it works fine with FlatList. I'm trying to move my current implementation from it to SwipeableFlatList.

from react-native-swipeable-list.

esthor avatar esthor commented on July 20, 2024

Ok, I may need to update this library to specifically use the latest FlatList version. Starting to test now...

from react-native-swipeable-list.

esthor avatar esthor commented on July 20, 2024

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.

jkoutavas avatar jkoutavas commented on July 20, 2024

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.

esthor avatar esthor commented on July 20, 2024

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.

jkoutavas avatar jkoutavas commented on July 20, 2024

@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.

jkoutavas avatar jkoutavas commented on July 20, 2024

@esthor Happy Holidays. Any news to share?

from react-native-swipeable-list.

github-actions avatar github-actions commented on July 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.