I am trying to get the key of the last node I have just pushed to on firebase but my code keeps erroring
constructor (props) { super(props) this.cartFirebase = f
You need to use limitToLast function.
limitToLast
this.cartFirebase.limitToLast(1).on('child_added', function(childSnapshot) { var snap = childSnapshot.val(); });