<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>React.js on New Schematic</title><link>https://newschematic.org/tags/react.js/</link><description>Recent content in React.js 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/react.js/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><item><title>Getting Going with React, Part II: On to Development</title><link>https://newschematic.org/blog/getting-going-with-react-part-ii-on-to-development/</link><pubDate>Sun, 01 Mar 2015 22:07:20 +0000</pubDate><guid>https://newschematic.org/blog/getting-going-with-react-part-ii-on-to-development/</guid><description>&lt;p&gt;&lt;em&gt;part one &lt;a href="http://codeblocks.tumblr.com/post/111688707280/getting-going-with-react" target="_blank"&gt;here&lt;/a&gt; | completed portfolio site redesign &lt;a href="http://newschematic.org" target="_blank"&gt;here&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;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 &lt;a href="http://facebook.github.io/react/docs/thinking-in-react.html" target="_blank"&gt;thinking in React&lt;/a&gt;, I figured a rebuild would be a natural fit.&lt;/p&gt;
&lt;p&gt;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 &amp;amp; maintaining a database through my shared web hosting service.&lt;/p&gt;</description></item></channel></rss>