Too Many Content Requests

During a phone screen recently, the CTO of the company was going through my portfolio site. He checked the browser’s network console and noticed that the site — a page built with React components — was sending multiple requests a second for data from a JSON object [the object serves as the page’s datastore because spinning up a database in this instance would be overkill]. A learning moment! I revisited the React docs and the code for the components. With a better understanding of React, the issue was quickly apparent: every time the Dealer component was rendered, an AJAX request for data.json fired. Which, just to get static data, was a lot. ...

Jul 8, 2015 · Christopher Boette

Getting Going with React, Part II: On to Development

part one here | completed portfolio site redesign here Rather than jumping into a full web application, I decided to start small with something I could finish in one sitting. I already had designed my portfolio site to use card-like visual components for each project. Having read over this article on thinking in React, I figured a rebuild would be a natural fit. Step one was to dump all of the content into a JSON file, which I could use instead of an actual database. This approach made sense because of the small amount of content, the lack of updates to the site [working on this!], and my lack of interest in setting up & maintaining a database through my shared web hosting service. ...

Mar 1, 2015 · Christopher Boette