logo

JavaScript Libraries and Frameworks

React

Purpose

React is a JavaScript library for building user interfaces that was developed by Facebook. It was released in 2013 and has since become one of the most popular tools for building web applications. It was created by Jordan Walke, a software engineer at Facebook. He was inspired by the functional programming language Lisp and sought to create a library that would allow developers to create reusable components that could be easily combined to build complex user interfaces.

It was initially used to build the Facebook news feed and was later released as an open-source project. It quickly gained traction within the developer community due to its simplicity and flexibility. The newsfeed was discontued in April because facebook felt users were using other sites for their news and politics.

Since its release, React has continued to evolve and has been adopted by a wide range of companies and organizations. It is now used to build many of the web's most popular applications, including Instagram, Airbnb, and Netflix. It has also spawned a large ecosystem of supporting libraries and tools, including React Native, which allows developers to build native mobile applications using React.

React has gained popularity among a wide range of developers, as it provides a powerful and flexible way to build user interfaces for web applications. Here’s a look at some of the people who commonly use React:Many prominent companies in the tech industry also use React, showcasing its versatility and widespread adoption. Some examples of companies using React in their tech stack include:

Facebook: As the creator of React, Facebook uses it extensively throughout its web applications, including the main Facebook site, Instagram, and WhatsApp Web.
Airbnb: Airbnb uses React to build its user interfaces, allowing them to create a seamless and performant experience for its users across various platforms.
Netflix: Netflix employs React to create its web application, taking advantage of its performance optimizations and component-based architecture to deliver a smooth user experience.
Uber: Uber uses React to power its web applications, making it easier for them to create intuitive and responsive interfaces for its users.
Pinterest: Pinterest leverages React’s component-based architecture to build a visually stunning and highly interactive web application for users to discover and save creative ideas.
Reddit: Reddit utilizes React to develop its web application, providing a fast and engaging user experience for millions of users across the platform.
Dropbox: Dropbox takes advantage of React’s performance optimizations and component-based architecture to create a user- friendly environment.

What are the pros and cons of using React

Pros

  1. Scalability: Node.js uses a non-blocking I/O model, which makes it highly scalable and suitable for building large-scale, event-driven applications.
  2. Speed: Node.js is built on the V8 JavaScript engine, which makes it fast and efficient. It can handle a large number of simultaneous connections and requests without slowing down.
  3. Large community: Node.js has a large and active community, which means there are many resources available online, including documentation, tutorials, and libraries. This makes it easier for developers to learn and use Node.js.
  4. Flexibility: Node.js can be used with a wide range of web technologies, including databases, front-end frameworks, and APIs. This makes it flexible and adaptable to different project requirements.

Cons

  1. Single-threaded: Node.js uses a single thread to handle incoming requests, which can cause performance issues when dealing with CPU-intensive tasks.
  2. Asynchronous programming: Node.js uses asynchronous programming, which can be challenging for developers who are used to synchronous programming. Asynchronous programming can lead to complex and hard-to-read code.
  3. Callback hell: Callbacks are often used in Node.js to handle asynchronous programming, which can lead to nested and hard-to-read code. This is known as "callback hell".
  4. . Limited support for CPU-bound tasks: Node.js is designed for I/O-bound tasks, and it may not be the best choice for CPU-bound tasks such as image processing or video encoding. In such cases, a different technology may be more suitable.

For futher information, visit these sites:

React Home Page

Wikipedia

Learn

I found several free tutorials online. They vary considerly in their approach. Some of the sites I found are the following.

First of all is React's own tutorial which can be found at their home page, React Tutorial which has a description of various campents of React including a code snippet for each. However, there is not any hands on exercises. Overall, I think this is a pretty good site.

Another site is our old friend, freeCodeCamp, which can be found at Front End Development Libraries . It follows the same format we’re used to in other code challenges.. Only this time you don’t build a specific web page. Each step is different page with either a code snippet that you add to or modify. Some times you’re presented a blank page and you start at line 1 and complete the assignment from scratch. I think this is a very good tutorial and it’s hands on.

Another approach to learning React can be found at Egghead Tutorial.This tutorial is video based instead of written instructions. It’s much like our Code With Me sessions. Except that in this case there’s no hands on coding. For someone whose preferred style of learning is to watch and listen, than this would be the best choice for them.

And lastly, another site: Frontarm Tutorial that consists of explaination and examples. This was the best site for examples. Although, again. no hands on exercises. Although, due to failing eyesight, I found it difficult to read. I would highly reccomend this site for anyone looking for lots of detailed examples.

Community

Like Angular, React also has very strong community support, which is one of the main reasons to adopt React JS in your project. Every day, a large number of individual React developers are contributing towards making React a better frontend framework. Currently, React JS has attained 214K stars on GitHub and 1,630 regular contributors.

Not only that, but experts are also regularly uploading free React tutorials on YouTube and writing in-depth React tutorial articles & blogs on the internet Apart from this, React experts are also regularly solving doubts on QA sites like Stack Overflow and Quora, meaning if you ever get stuck while using React, you can always get reliable solutions given by experts.

The top support groups are as follows

Examples

These examples were taken from the tutorials listed above in this report. Note that React function names begin with a capital letter.

This is how you create a button on an HTML page,

logo"

Now that you’ve declared MyButton, you can nest it into another component: logo /><br><br><br>
                     </div>
                     </div>
                     <br><br>
                     <div id=



Then you write the CSS rules for it in a separate CSS file:

logo

You can write conditionals in React.

logo