{"id":249,"date":"2016-09-21T11:08:23","date_gmt":"2016-09-21T15:08:23","guid":{"rendered":"https:\/\/mberlove.com\/blog\/?p=249"},"modified":"2016-09-21T11:08:23","modified_gmt":"2016-09-21T15:08:23","slug":"learning-reactjs-part-1-steps-takeaways","status":"publish","type":"post","link":"https:\/\/mberlove.com\/blog\/learning-reactjs-part-1-steps-takeaways\/","title":{"rendered":"Learning ReactJS, Part 1&#8211; Steps &#038; Takeaways"},"content":{"rendered":"<p>This past March, I discovered my javascript skills felt out of date. I needed to catch up, so I learned Angular &#8212; took an online course, built a couple of minor projects, did some freelance work that used it. It felt good.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Now they tell me Angular is out, React is in.<\/strong><\/p>\n<p>Truthfully, I think the endless treadmill of languages and libraries is a bit ridiculous, and I believe strongly that developers (and especially developer managers!) ought to care more about what the project requires than what language, etc, is &#8220;in,&#8221; but I recognize the need to stay up to date in all one&#8217;s skills.<\/p>\n<p>&nbsp;<\/p>\n<p>Therefore &#8212; off to battle with ReactJS, via CodeAcademy. Let&#8217;s see how it goes.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>1. Compiled javascript? Hm.<\/strong> As a long-time ES5-er, I&#8217;m dubious already. I just barely tolerate ES2015 in pure Node. It just doesn&#8217;t exactly <em>feel\u00a0<\/em>like javascript. But I guess there are a lot of advantages, such as better class usage, debugging, maintainability&#8230;well, we&#8217;ll see.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>2. Ok, CodeAcademy is slow.<\/strong> Both in terms of the learning curve and in app connectivity. I hope they&#8217;re not powered by React. As long as I&#8217;m searching for a new course, I think I&#8217;ll let myself get sidetracked and <a href=\"https:\/\/babeljs.io\/docs\/learn-es2015\/\">read up on ES2015 to give myself some background<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<p>It&#8217;s heady reading, but thorough, and useful, and interesting too, as long as you take the occasional break.<\/p>\n<p>&nbsp;<\/p>\n<p>Likewise to get acquainted with ES2016 and &#8217;17: <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/New_in_JavaScript\/ECMAScript_Next_support_in_Mozilla\">https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/New_in_JavaScript\/ECMAScript_Next_support_in_Mozilla<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>3. <strong>To start learning the topics surrounding React<\/strong>, I&#8217;ve found this book: <a href=\"https:\/\/www.syncfusion.com\/resources\/techportal\/details\/ebooks\/Reactjs_Succinctly\">ReactJS Succinctly<\/a> (free!)<\/p>\n<p>&nbsp;<\/p>\n<p>Some takeaways from the book:<\/p>\n<p>&#8211; <em>A f<\/em><em>ocus on views<\/em>: React focuses on a clean view, letting the developer ignore some of the nitty gritty of the data.<\/p>\n<p>&#8211; <em>Components:<\/em> Like many frameworks, React provides an easy way to create components (this holds true especially if pairing React with JDX).<\/p>\n<p>&#8211;<em> React is not amazingly readable<\/em>. It&#8217;s an intentional sacrifice, to enable clean and reusable code.<\/p>\n<p>&#8211; <em>Mixins:<\/em> Not quite the same as in Ruby, but React can add in sections of functional code to reuse.<\/p>\n<p><em>\u00a0&#8211; React uses native browser javascript events<\/em>, e.g. onClick. I guess you could pair this with jQuery?<\/p>\n<p><em>\u00a0&#8211; This book has a <\/em>great <em>practical example section<\/em> where you can follow along to build a working game in React. I skipped this for now as I intend to follow up with some practical training courses.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>4. Time to learn React for real.<\/strong> I&#8217;ll be starting off with <a href=\"https:\/\/www.tutorialspoint.com\/reactjs\">this tutorial from TutorialsPoint<\/a>, because it looks like a good balance of practical and informational.<\/p>\n<p>&#8211; <em>Getting started takes a lot of work<\/em>, but that&#8217;s expected for a framework like this. You&#8217;ll want Node, npm, babel, React, ReactDOM, and more. Once you get used to it or automate it, it&#8217;s no big deal.<\/p>\n<p>&#8211; <em>&#8220;React recommends using inline styles.&#8221;<\/em> This seems a suspicious departure from reasonable protocol, and I want to look into this later.<\/p>\n<p>&#8211;<em> This tutorial meanders<\/em>, and is not the best for following in code, but it makes decently organized reading to firm concepts in your mind. We&#8217;ll back it up later with something a bit more interactive.<\/p>\n<p>&#8211; <em>M<\/em><em>uch of this is redundant material, having read the book mentioned earlier <\/em>&#8212; redundant in a good way, mostly. It&#8217;s a lot less content, so the important points get reaffirmed in your mind.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>5. After all that, back at the CodeAcademy React course after all.<\/strong> It&#8217;s still slow, annoyingly so, but it&#8217;s pretty thorough, and probably worthwhile. The interactivity alone is worthwhile, and of the interactive courses I previewed, this is the most straightforward to dive into.<\/p>\n<p>&nbsp;<\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<p><a href=\"&lt;a href=\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-258\" src=\"https:\/\/mberlove.com\/blog\/wp-content\/uploads\/2016\/09\/react1.jpg\" alt=\"CodeAcademy ReactJS Part 1: Complete!\" width=\"1013\" height=\"163\" srcset=\"https:\/\/mberlove.com\/blog\/wp-content\/uploads\/2016\/09\/react1.jpg 1013w, https:\/\/mberlove.com\/blog\/wp-content\/uploads\/2016\/09\/react1-300x48.jpg 300w, https:\/\/mberlove.com\/blog\/wp-content\/uploads\/2016\/09\/react1-768x124.jpg 768w\" sizes=\"auto, (max-width: 1013px) 100vw, 1013px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>After all that, I at least understand many of the fundamentals fairly rigorously. Next up, CodeAcademy&#8217;s ReactJS Part II (sigh), and a personal coding project!<\/p>\n<p>&nbsp;<\/p>\n<p>The learning never ends &#8212; and that&#8217;s wonderful.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This past March, I discovered my javascript skills felt out of date. I needed to catch up, so I learned Angular &#8212; took an online course, built a couple of minor projects, did some freelance work that used it. It [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[118,109,125],"tags":[183,184,119,185,37,182],"class_list":["post-249","post","type-post","status-publish","format-standard","hentry","category-javascript","category-learning","category-programming","tag-ecma","tag-es2015","tag-javascript","tag-jdx","tag-learning","tag-react"],"_links":{"self":[{"href":"https:\/\/mberlove.com\/blog\/wp-json\/wp\/v2\/posts\/249","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mberlove.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mberlove.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mberlove.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mberlove.com\/blog\/wp-json\/wp\/v2\/comments?post=249"}],"version-history":[{"count":7,"href":"https:\/\/mberlove.com\/blog\/wp-json\/wp\/v2\/posts\/249\/revisions"}],"predecessor-version":[{"id":261,"href":"https:\/\/mberlove.com\/blog\/wp-json\/wp\/v2\/posts\/249\/revisions\/261"}],"wp:attachment":[{"href":"https:\/\/mberlove.com\/blog\/wp-json\/wp\/v2\/media?parent=249"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mberlove.com\/blog\/wp-json\/wp\/v2\/categories?post=249"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mberlove.com\/blog\/wp-json\/wp\/v2\/tags?post=249"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}