I'm getting warning
EventEmitter.removeListener('change', ...): Method has been deprecated. Please instead use `remove()` on the subscription returned by `EventEmitter.addListener`
on that function
const addData = (todo_name)=>{
firestore()
.collection(constants.collection_name)
.add({
is_completed: false,
is_deleted: false,
todo: todo_name,
})
.then(res => showSuccess(constants.todoAdded))
.catch(error => {
showError(error);
});
}
const onAddTodo = async () => {
updateState({isLoading: true});
await addData(todoName); // add todo in data base and after that update the list
getTodos();
};
can anyone tell me why I'm getting that warning?