React Fundamentals - Day One

Introduction

 
I am going to write a series of articles on React. On the first day of learning, we are going to see the basics of React.

React Fundamentals
Image Source: Google. 
 

What is React?

 
React is a small but powerful library written in JavaScript. It is an open source declarative, efficient, and flexible JavaScript library used to develop user interfaces, it is developed by ‘Facebook’. You can use it by including it on your web by using the </script> tag. Just like you would use any other JavaScript library, like jQuery etc. We can refer to programming with React as ‘functional templating’. Learn once, write everywhere.
 
It is basically Viewed in MVC (Model-View-Controller) framework.

React Fundamentals
Image Source: Google.
 
It is concerned with the components that utilize the expressiveness of JavaScript with an HTML – like a template syntax. Programming with React is a lot more than just learning about and using React ‘objects, components, props, states, keys, refs etc.’
 

History of React

 
Facebook created React in 2011 for their own use on facebook.com, one of the highest-trafficked websites in the world. React was then utilized by Instagram a year later in 2012. After using React internally for 2 years, Facebook open-sourced React in 2013. Later in 2014, embraced by many large companies. This popularity led Facebook to open source React Native in 2015. React Native is a related library that allows you to create native mobile applications for iOS and Android using React. In April of 2016, React reached another significant milestone by publishing version 15. This was a notable release because the previous version was 14. Facebook is deeply committed to React since it also uses React on Instagram and React Native for mobile development. Today, many large, well-respected Fortune 500 companies now utilize React in production.
 

Why React?

 
The biggest question on your mind likely is why should I choose React compared to the long list of alternatives? Following are the good reasons for learning React,
  1. Flexibility
    Easily used with other frameworks like Angular and Ember. Where can I use React?

    1. Web Apps.
    2. Static Sites.
    3. Mobile (By using React Native).
    4. Server-rendering using Next.js
    5. Virtual Reality using React VR.
    6. Broad Browser Support.
  1. Testability
    It’s hard to test the front-end. React is attractive and noteworthy because its design is very friendly to automated testing,
Traditional UI Tests React
Difficult to set up Little to no config require
Require browsers Run in-memory via Node
Slow Fast
Time-consuming to write, maintain Write quickly, update easily
Testing Frameworks for React:
  • Mocha.
  • Jasmine.
  • Tape.
  • QUnit.
  • AVA.
  • Jest. 
  1. Supports SEO
  2. One way data binding
  3. Uses virtual Dom for performance(speed)
  4. Scalability

Summary

 
I hope that beginners, as well as students, understood the concept of React. If you have any suggestion regarding this article, please contact me. 
 
Stay tuned for other concepts of React coming soon!
 
“Learn It, Share it.