Counter using React, to be compared with vanilla JS.