i am using firebase for database and i have two collections taskData and archiveData, i want to remove one fild form taskData and add to archiveData i have also use redux in project
export const addToArchive = (key, categoryKey) => {
return async dispatch => {
database()
.ref('/todoDatabase/' + categoryKey + '/data/' + key)
.remove();
dispatch({
type: ActionTypes.ADD_TO_ARCHIVE,
});
};
};
basically i want when data is removed from taskData then add new fild to archiveData so how can i use callback method for '.remove()'