Use the timeout function the react loop provides