JavaScript Fundamentals Before Learning React - hochan222/Everything-in-JavaScript GitHub Wiki
JavaScript Fundamentals Before Learning React
Why learn React?
Innovation
React can be integrated seamlessly with any other library or framework because React is a view only library, (it is the view part of the Model View Controller MVC architectural UI pattern). The freedom to use any other framework and library makes it possible to experiment and so to innovate.
Simple API
React has a relatively simple API and so has no steep learning curve. It only has a handful of methods to understand. The code to make ‘components’ of the UI (i.e., buttons etc) is straight-forward as there is very little boilerplate code which makes the library comparatively accessible.
ES6
“ES6 refers to version 6 of the ECMA Script programming language. ECMA Script is the standardized name for JavaScript, and version 6 is the next version after version 5, which was released in 2011. It is a major enhancement to the JavaScript language, and adds many more features intended to make large-scale software development easier.” You can read more for the details of the new features that ES6 introduces.
JSX
JSX stands for Javascript Syntax Extension. It allows you to use HTML and XML in JavaScript. Essentially, the HTML/XML code is ‘transpiled’ into JavaScript. In other words, the HTML/XML is converted into JavaScript before the code is compiled. This enables the full power of JavaScript to be employed with the relative ease of writing in HTML.
Unidirectional Data Flow
React implements one-way data flow which makes it easy to reason about your app. Essentially all the parts of the UI are contained within each other which makes tracing data flow super simple.
Community
React is a very popular and growing library. This means that the React community is large and growing too. So there are a plethora of resources out there to help you as you learn. Essentially, you won’t get ‘stuck’ anywhere for extended periods of time as someone will have had the same problem as you before and is likely to have posted about it online.