<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Troubleshooting on New Schematic</title><link>https://newschematic.org/tags/troubleshooting/</link><description>Recent content in Troubleshooting on New Schematic</description><generator>Hugo</generator><language>en-us</language><copyright>Christopher Boette, CC by-sa-nc</copyright><lastBuildDate>Wed, 08 Jul 2015 15:01:22 +0000</lastBuildDate><atom:link href="https://newschematic.org/tags/troubleshooting/index.xml" rel="self" type="application/rss+xml"/><item><title>Too Many Content Requests</title><link>https://newschematic.org/blog/too-many-content-requests/</link><pubDate>Wed, 08 Jul 2015 15:01:22 +0000</pubDate><guid>https://newschematic.org/blog/too-many-content-requests/</guid><description>&lt;p&gt;During a phone screen recently, the CTO of the company was going through my &lt;a href="http://newschematic.org" target="_blank"&gt;portfolio site&lt;/a&gt;. He checked the browser&amp;rsquo;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&amp;rsquo;s datastore because spinning up a database in this instance would be overkill]. A learning moment!&lt;/p&gt;
&lt;p&gt;I revisited the &lt;a href="https://facebook.github.io/react/tips/initial-ajax.html" target="_blank"&gt;React docs&lt;/a&gt; and the &lt;a href="https://github.com/chrisbodhi/newschematic/commit/4ead7ca82888f024528be2447ae989357508379c" target="_blank"&gt;code for the components&lt;/a&gt;. With a better understanding of React, the issue was quickly apparent: every time the &lt;code&gt;Dealer&lt;/code&gt; component was rendered, an AJAX request for &lt;code&gt;data.json&lt;/code&gt; fired. Which, just to get static data, was a lot.&lt;/p&gt;</description></item></channel></rss>