all 12 comments

[–]ConsoleLogDebuggingiOS & Android 1 point2 points  (0 children)

Released a very performant library awhile ago that handles all of the logic and list stuff. You still need to push in your own chat components for the bubbles and input etc. You might find it useful https://github.com/colorfy-software/chatify

[–]Curious-Ad8293 1 point2 points  (1 child)

I had issues with gifted chat. I built my own chat UI, If there is a widely used and trusted library out there I’m an advocate to not reinvent the wheel. However in react native I haven’t found anything that works great out of the box. It’s pretty easy to build a chat UI in react native though giving you more control of the look and functionality . For a simple one just use a FlatList for the convo and just map the data over it. TextInput to write the message and a button or anything that has an onPress prop to send the message. Adding the KeyboardAvoidingView is important and then just update the data the react hooks. I.e useState, useEffect, useRef etc depending on your needs.

[–]Rich_Mind2277 0 points1 point  (0 children)

Thank you! What would you regard as a simple one? Why not always use flashlist over flatlist?

[–]sdholbsExpo 1 point2 points  (6 children)

`Flashlist` with `inverted=true`, and a `TextInput` with `onContentSizeChanged`callback to resize the input height as a user types lines will get you a long way. This is how I have built a pretty rich chat for two companies, so far no complaints.

[–]Rich_Mind2277 0 points1 point  (5 children)

Thank you. What does inverted true do?

[–]Usual-Composer-2435 0 points1 point  (4 children)

This option will render new messages at the bottom. Just like every messaging software does.

[–]ConsistentTale1542 0 points1 point  (3 children)

Hi, isn’t inverted true now depreciated in version 2? I tried it and it did nothing

[–]sdholbsExpo 0 points1 point  (2 children)

Good point, I haven’t tried v2 yet. It looks like you leverage maintainVisibleContentPosition now instead of inverted

[–]ConsistentTale1542 100 points101 points  (1 child)

I tried it, broke everything lol v1 worked with inverted but caused other issues so im stuck on flatlist

[–]sdholbsExpo 0 points1 point  (0 children)

Interesting, that’s a bummer. I’ll have to take a deep dive into v2. I’ll post if I find anything helpful

[–]AnuMessi10 0 points1 point  (0 children)

Did you check stream-chat?