2

Firebase push() collections item key, is it generated immediately on client side or after sync done?

eg this code:

var messageListRef = new Firebase('https://SampleChat.firebaseIO-demo.com/message_list');
messageListRef.push({ 'user_id': 'fred', 'text': 'Yabba Dabba Doo!' });

And if immediately generated on client side, how can i acquire it immediately? without using callback

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Nuha Dzikri
  • 570
  • 1
  • 7
  • 11

1 Answers1

2

Firebase's push ids are generated client-side. That's why they continue to work when you're not connected to the server.

See:

Community
  • 1
  • 1
Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807