Use react event loop