Giter Club home page Giter Club logo

example-chat-react-native's Introduction

xmtp

example-chat-react-native's People

Contributors

jhaaaa avatar neekolas avatar yash-luna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

example-chat-react-native's Issues

Streaming message feature

Context

Attempting to use xmtp-js in React Native, I successfully integrate the SDK, I can send messages, and also get the messages list works fine.

Problem

Listen for new messages in a conversation it's not working

for await (const message of await conversation.streamMessages()) {
  if (message.senderAddress === xmtp.address) {
    // This message was sent from me
    continue
  }
  console.log(`New message from ${message.senderAddress}: ${message.content}`)
}

Screenshot

Screen Shot 2022-11-16 at 12 11 51 PM
Screen Shot 2022-11-16 at 12 14 23 PM

Expectation

As I followed the documentation, the expected result whenever I send a message from user A to user B, the message should be displayed for user B, but it is not the case for me.

I'll be so thankful If give us any hints to make this work. :)

Conversion from BigInt to number is not allowed

Hi!

I added XMTP.js to my React Native app. But I try to initialize the client I get an error that says Conversion from BigInt to number is not allowed

fyi, the app is using hermes and that I've already added the polyfills

Calling `conversations.list()` is SLOW

Thanks for this lib and this sample app!

However, I'm having really bad performance with it, do you know if that's normal?

A classic conversations.list() usually takes 2-3 seconds when in the browser or NodeJS.
But in the react native environment it takes 42 seconds in the simulator and 58 seconds on my iPhone!

Using the wallet created in app (that's empty) it is almost immediate
Using my own wallet that has 7 conversations on the testnet it takes a very long time

Here is an example code diff to show you what I did in the app (pretty straightforward) : main...nmalzieu:xmtp-react-native:main

Do tell me if you want more information or if we should hop on a call to debug together

Capture d’écran 2023-01-03 à 09 54 09
IMG_39EEFC00306A-1 (1)

Review RN example & make go/no-go call

Options going forward

  • RN example app (in progress; severe perf issues)
  • React Native SDK
  • NEW RN example app - webview

Dimensions to consider:

  • Effort - to GA; maintenance post GA
  • Impact (dev demand, projects unblocked, etc)

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.