Building a reading time widget with React and jQuery

added by Robert Greyling
10/17/2014 8:01:59 AM


React makes building standalone components really simple. When the data you care about is already in the DOM, it makes a ton of sense to offload the computation and rendering to the client, rather than worrying about doing everything before sending data down the wire.


Drew Peterson
10/17/2014 5:47:23 PM
So, I read through this twice. The first time I thought, why not just use jQuery? After reading it the second time though, I could see how using React allows the developer to encapsulate the behavior of the reading time widget within the component rather than externally within the page. The next step would be to decouple the widget from the content and handle the word-counting in a service object, or make that functionality intrinsic to the content by making it a react component as well.