improve react plugin