Another implementation using ReactJS