uses react to make async http calls
moves loop->run() out of the loop