Conducting a UI/UX audit for your SaaS product is essential to discover potential issues that may impact the user experience. Read on to learn more about the benefits of conducting a UI/UX audit for SaaS, when to accomplish it, and what is the best approach.
2020-02-046 min read
ReactJS and the most frequent questions about it
Looks like you’ve googled one of them and got to our article. We suppose your reason for search may be the following:
- you want to choose a framework for your website;
- you want to choose a framework to study in IT;
- you bet with your friends they know nothing of ReactJS;
- you are a React fan, and your friend is an Angular fan. This google search is supposed to solve your battle;
- you are a student who needs info for the lesson;
- you are looking for a different definition of React in the dictionary. Well, it is “to act in a particular way as a direct result of something else”. Here we talk about tech, join us and find out another definition.
Now let’s take a look at the most frequent questions people give to ReactJS developers. If you have any more – write them to us on Facebook and our front-end devs will be glad to answer all of them.
WHAT IS REACT, EXACTLY?
React is a JavaScript library created by Facebook for interactive User Interface. Didn’t get any clear? Okay, let’s dwell deeper into the definition. Recall the last time you visited a website, and there were animated graphics, photo slideshows, autocomplete text suggestions and interactive forms. There’s a great chance it was written in JavaScript. There comes a time when you need to include repetitive functions. Would you want to re-code every function when it needs to be repeated? No, it’s time-consuming. You’ll use the JS library containing a pre-written JS code that automatizes the process. ReactJS is one of these libraries. It is based on components that render results. The results are the icons, buttons and to-do lists you see on the website.
HOW MUCH TIME DOES IT TAKE TO LEARN REACT?
Every SapientPro developer, working with React, states in one voice that it depends on your computer science knowledge. If you begin studying React while in IT you are not even a newbie – it will take time to build common knowledge about the basic principles of computer science first. Only then you’ll come to React.
Alexander: “I was watching Youtube videos and learned how to use it in two weeks. People think programming is difficult. It isn’t if you have a strong base from college and University or a strong base you’ve created yourself! To learn React you will need to have an acquisition in HTML and CSS as well as knowledge of JavaScript”.
Vlad: “Well, you can’t say that you`ve learned something and then you end up knowing it perfectly. I learn React all the time while working with it on our project. Also, JavaScript is constantly improving, so if you don’t keep up with the pace – you become an outsider. To learn React you will need an advanced knowledge of JavaScript, that’s for sure. However, I believe, that even if you have zero knowledge in IT, everything is possible if you have enough desire”.
WHY IS REACT BECOMING SO POPULAR?
According to StackOverflow 2019 surveys, React is the 2nd popular and most-used front-end framework. The main reasons for the popularity:
- Reusable and stateful components;
- JSX;
- Ability to split a complex code into components;
- The State storing code changes in one section;
- Virtual DOM, making the app fast;
- Easier to enter the profession and start working.
SAPIENTPRO GUYS, WHAT DO YOU THINK? WHY IS REACT SO POPULAR?
Yura: “Because it’s Facebook. Every time some global brand connects with technology it becomes an instant hit. Also, comparing with Angular it takes less time to learn and fits smaller projects better. Companies more and more often choose it as a framework, so there is a great demand for the devs who code in React”.
Vlad: “Because it is flexible. You can change the part of the code without harming its overall structure. For me, it is a total feeling of freedom while I code. Seems like I can do anything if I put my mind to it”.
Oleg: “I view it as some constructor that you can logically build yourself. When it comes to Angular, for example, it has many in-built features that your project doesn’t need. Imagine it as if you had a large house with 15 rooms and used only 5. You still have to pay taxes for the whole house. Isn’t it better to build your home according to your needs? That’s what I like about React – you can build the website with the features you require. Nothing redundant”.
Alexander: “A good thing about React is that it doesn’t have strict standards in architecture design. You can structure the code as it is needed for a specific project. It is easy to split your application into separate modules or make “File Type First” architecture”.
WHAT ARE THE PROS OF USING REACT?
- License. It is an open-source library, so you have no problems with access;
- JSX is an extended syntax that implements HTML elements into JavaScript. JSX is the basis of React`s elements. It is a tool that visualizes the code to make it more readable. Also, it efficiently displays errors;
- Good community. Every time you need support in solving some issues – the Facebook community is so wide that you are sure to get an answer;
- Virtual DOM displays the whole DOM-tree as a JavaScript object and enables us to change only a specific part of the code without the need for completely rebuilding. Every time you use a website with React the virtual DOM automatically appears on the server-side. Previous and recent versions are compared, and if there are some changes, the virtual DOM will automatically configure them;
- Component-based approach. You can divide the code into small blocks in the app. Even after division, they remain stable and maintainable;
- Up to date. Facebook is constantly improving the code. Who knows maybe one day we’ll write an article: “React – a library that evolved into the framework”. However, many people think of it as a con. Wonder why? Keep reading.
ARE THERE ANY CONS OF USING REACT?
Yes, there are. As in any other application. React has its drawbacks that we hope will be resolved:
- Documentation. The manual is difficult for newbies;
- Speed of development. It is a con for React creators. For devs, it may be overwhelming to keep up with the constant feature’s introduction and change.
Here’s what our devs think:
Vlad: “The main drawback of React is that it’s still not a framework. There are still many things to do yourself because many features are not implemented”.
Alexander: “You will have to solve some common issues by yourself. Many people view it as a drawback. Yes, it’s not Angular with everything built-in. However, for me, it is rather a con, because it makes a platform more adaptive to your specific project”.
Vania: “When I only started learning to React everything was pretty unclear. Yes, the manual is something Facebook can improve. It was especially hard when I had to use React with Redux.”
IS IT POSSIBLE TO USE IT FOR MOBILE DEVELOPMENT?
Yes! Facebook introduced React Native. It allows us to build cross-platform apps that will do a trick for computers as well as smartphones. Before it, you had to write separate code for iOS and Android to make your website work on every platform.
Yura: “It’s great that they did so. I mean, it is still technically better to code apps from the scratch on Java for Android and Swift for iOS. Still, the sheer fact that they make it possible to use JavaScript for mobile development is pretty cool”.
REACT OR ANGULAR?
Both platforms are the brainchildren of two giants: Google and Facebook. The main difference everyone ignores is that Angular is an integral framework, while React is a library.
ANGULAR
- Creator – Google;
- It’s a framework having a full package of functions and usually, you won’t need to implement libraries;
- The documentation and manuals are highly understandable, the framework is stable in its development;
- HTML+TypeScript;
- The regular DOM makes the apps slower;
- 59600 stars on GitHub;
- Used by McDonald’s, Samsung Forward, Overleaf, Colgate, HBO, Forbes.
REACT
- Created by Facebook;
- It’s a library, and to have more functions than it proposes you will have to include other libraries as well;
- A medium learning curve, meaning that the documentation and manuals are hard to understand. The development is fast. It’s hard to learn at the same speed;
- There are two DOMs: Real and Virtual. With Virtual one the app works faster and requires less power cost because it allows changing specific parts of code without dealing with overall structure changes;
- 140000 stars of Github;
- Used by Facebook, Instagram, Netflix, Twitter, Airbnb, PayPal, The New York Times.
WHY DID FACEBOOK CREATE REACT?
Founded in 2004, Facebook got more and more popularity with each year.
- 1 million — End of 2004;
- 100 million — August 2008;
- 750 million — July 2011 ( the year Jordan Walke created React).
It became harder to maintain the code. Facebook needed more and more people. The number of Facebook workers could rise proportionally to the rise of social media popularity. That wouldn`t be effective to control the work of so many people, so Facebook implemented Flux.
Vlad: “It all began with message icons. You see when you got a message on Facebook number 1 had to appear in three places: in the header, on the sidebar, and in chat. Every time you got your “Hi, how you doing?’ from Jack, the system had to perform three different algorithms for each number 1 on the icon to appear. The info came from DATABASE to the CONTROLLER and then to VIEW three times. Three requests, and it’s only with one message. With numerous messages at the same time, it took too many resources. Facebook implemented Flux architecture – unidirectional data flow. Every time the message came, it automatically configured and appeared at the same time in the header, on the sidebar, and in chat. React uses the Flux model now, so I would say it was a prerequisite to creating React”.