React coding practice