After reading many articles online on where to start first, I finally decided on React.js – and here are a few reasons why I don’t regret my choice!
Take this App component for example, containing many other components:
App is seen as your main component container, rendering out each of your website’s components. App itself is then rendered onto the element in your single index.html as so:
Not only does this make the transition between sections of your website a lot smoother giving it won’t refresh the page, it forces you to write cleaner code and removes the element of duplication, which is at times inevitable with static HTML pages. A component can be anything from a whole entire ‘About’ section to the tiniest of icons or buttons – if it’s going to be reused, it should be a component.
There are a lot of packages supporting React including the use of routing, css transitions and google maps. What’s more, Facebook released a Create React apps, a brilliant scaffolding with all the necessary compilers needed to run it right out of the box.
React is a great way to get you into developing chunks of reusable code that make up the bigger picture of your website, and can easily be swapped around, removed or re-added in future.
If this post got you into trying this awesome library out then:
A. Excellent! My job here is done,
B. Your best bet is installing Create React apps then heading over to Code Academy who will get you started on the basics, for free,
C. Have a look at a React application I completed here as taught by Wes Bos in his React for Beginners course.