функция.
аюсь получить ключ последнего узла, который я только что нажал на firebase, но мой код продолжает давать ошибки
constructor (props) {
super(props)
this.cartFirebase = firebaseApp.database().ref('carts')
}
componentDidMount () {
this.cartFirebase.child(DeviceInfo.getUniqueID() + '/items').push({
item: this.props.data.name,
qty: 1
})
this.cartFirebase.limit(1).on('child_added', function(snapshot) {
console.log(snapshot)
})
}