fullstackreact / react-native-firestack

A firestack v3 react-native implementation
MIT License
715 stars 132 forks source link

Android #35

Closed blumanski closed 8 years ago

blumanski commented 8 years ago

I know, this is still in progress. I am testing a bit at the moment and noticed some stuff.

On IOS the code below works fine, it is getting data and is updating data on change. The same code does not work on android yet.

_this = this
        this.props.FirebaseStack.database.ref('chat/Zeitkapsel/messages').on('value', function(snapshot) {
            _this.setState({
                dataSource: _this.state.dataSource.cloneWithRows(snapshot.value),
                animating: false
            });
        })

On android, the code below works, so, "once" works

       _this = this;

        this.props.FirebaseStack.database.ref('chat/Zeitkapsel/messages').once('value')
            .then(function(snapshot){
                _this.setState({
                  dataSource: _this.state.dataSource.cloneWithRows(snapshot.value),
                  animating: false
                });
            })
            .catch(function(error){
                console.log(error);
            })
auser commented 8 years ago

Oh yikes! I'll check that shortly. Thanks for reporting!

blumanski commented 8 years ago

It seems just to load and the callback never finish, no error message either. Thanks for looking

auser commented 8 years ago

Hmm... I can't replicate it... it's working here... Are you using the npm version or the github version? @blumanski

by the way, I am in the gitter channel if you want to chat real-time

blumanski commented 8 years ago

I am using the npm version, I will retest it tomorrow, may it's another problem. I will upgrade to the master branch and see how that goes.

Thanks @auser

auser commented 8 years ago

Awesome @blumanski

I believe the npm and github version are much different than each other. I'll tag the next release

blumanski commented 8 years ago

@auser I just tried it using the master branch instead of the npm version. It works fine.

I did run into some IOS build trouble, I will try again to get it run and let you know. Cheers

auser commented 8 years ago

Did you figure out the iOS build issue?

Get Outlook for iOS

On Sun, Sep 25, 2016 at 5:26 PM -0700, "Oliver Blum" notifications@github.com wrote:

Closed #35.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.