Firebase stops saving when i use refresh

I want to refresh my page after save of newRider to Firebase. But when I use window.location.reload(); or with (false) it does not save. Without it it works. And is it ok to have code that long in one file? import React from "react"; import { RidersDB } from "../../Backend/DataBase/RidersDB"; const ridersDB = new RidersDB();… Read More Firebase stops saving when i use refresh

Remove items from one list if they contain strings from another list

I’m looking for the most efficient way to remove items from one list if they contain strings from another list. For example: B list contains: TomWentFishing SueStayedHome JohnGoesToSchool JimPlaysTennis A list contains: GoesToSchool SueStayed C list should contain: TomWentFishing JimPlaysTennis I’ve used this code, but it takes up a lot of time as the lists… Read More Remove items from one list if they contain strings from another list

Returning counting result from Firebase Query

I try to get the amount of rows in my Firebase. But is says cannot find counter in scope on line return counter. extension FourthTabFirstView: UITableViewDataSource { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { let ref = database.child("placeID") ref.observe(.value, with: { (snapshot: DataSnapshot!) in print(snapshot.childrenCount) let counter = snapshot.childrenCount }) return counter… Read More Returning counting result from Firebase Query