The firebase saga push method, returns a key, however, it returns a key different to the one created on Firebase. I
export function* push(path, fn, getKey) {
const key = yield call(newKey, path);
const payload = yield call(fn, key);
const opts = newOpts('error', 'key');
const ref = firebase.database().ref(path);
const [_, { error }] = yield [call([ref, ref.push], payload, opts.handler), take(opts)];
console.log(_, 'METHOD');
console.log(error, 'ERROR');
// console.log(key, 'KEY');
if (getKey && error == undefined) {
return key;
}
return error;
}