React Get Query String Javascript Functions Without Return