Reactjs Overview


Reactjs Overview

            In the past years, in the area of web development, there have been lots of trends consisting of new technologies that stirred up the developers’ enthusiasm. A considerable amount of new ideas and implementations have had their hour of fame. However, few of them were here to stay.
            One of those is React JS, the one that gained the greatest popularity and appreciation from the front-end community. It currently reaches about 2-3 million downloads per week, it is supported by the billion-dollar company - Facebook, with the help of a community of active contributors.



            React is a library – NOT a framework. What makes it not a framework is the fact that it is not a complete solution and we will often have to use additional libraries with React to form any front-end solution. But what makes React stand out from other practices?

1.      Predictability and Declarability

Let’s take the following code example:


If you can figure out how a page would look like in a matter of second only by looking at some lines of code, that’s already an advantage. This is what we call declarative code.

Declarative code describes what we want, as opposed to imperative code that tells how to do it.

The difference between then can be explained in a simple manner. Imagine yourself going to a bakery. When you get there, you can ask the bakes either:
a.      Can I please get a rosemary bread?
b.      Dissolve sugar in warm water in a medium bowl, and mix in the yeast. Mix in salt, butter, 1 tablespoon rosemary, and Italian seasoning, 2 cups flour. Line a baking sheet with parchment paper. Place dough on the baking sheet. Cover, and allow to rise 1 hour, or until doubled in size. Place in oven at 190 degrees C. Please?
The option a. is the declarative way. It presents less bugs, less misunderstanding, it has a smaller volume and it’s easier to adapt to it.
Because each line of code in the image above is “describing” what it represents, they are called components. Which leads to the second point:

2.      Componentization
Usually, a React App is made up by a multitude of components. This contributed to the reusability of code, the components having the ability to be easily repeated across multiple pages. This saves valuable time on development and testing, having a single source code for problems that might appear in more than one place across the application.

3.      JSX
Although it may not be appreciated by everyone, JSX is a great way to bring the JavaScript advantages in an environment that resembles the HTML markup. It allows you to use conditional rendering, to call functions that return JSX as a value, to inject convenient ES6 features right in your HTML-like code.
4.      Mutations
In order to make changes to the state of a component, in React you have to use the setState() function. This extra step is because the state is a valuable piece of information and any change made to it can affect your component’s behavior. We can also take this additional explanation by Revanth Kumar:
“This is because React wants to re-run certain life cycle hooks, [such as] componentWillReceiveProps, shouldComponentUpdate, componentWillUpdate, render, componentDidUpdate, whenever state changes. It would know that the state has changed when you call the setState function. If you directly mutated state, React would have to do a lot more work to keep track of changes and what lifecycle hooks to run etc. So to make it simple React uses setState.”

5.      React Native
With a popularity and performance above the charts, React Native is a powerful tool for building native mobile applications. Is has a structure and logic similar React JS, and it is easy to pick up if you come from this environment. It uses the same code to build applications on iOS as well as on Android, while giving you the advantage of using components native to your platform in the application.

Conclusion
With many advantages not covered in this article, React keeps attracting the developers’ interest, being the library that revolutionized how we write and treat front-end code nowadays. With an active community and support from the many corporations that use it (such as Netflix, Airbnb, Yahoo, Atlassian, Coursera, Uber, WhatsApp, Dropbox, etc), we can only predict a long and successful life for React.




9 comments

  1. Machine Learning Projects for Final Year machine learning projects for final year

    Deep Learning Projects assist final year students with improving your applied Deep Learning skills rapidly while allowing you to investigate an intriguing point. Furthermore, you can include Deep Learning projects for final year into your portfolio, making it simpler to get a vocation, discover cool profession openings, and Deep Learning Projects for Final Year even arrange a more significant compensation.

    Python Training in Chennai Python Training in Chennai Angular Training Project Centers in Chennai

    ReplyDelete
  2. FOXZ88.NET online casino website Global standard 2020-2021
    คาสิโนออนไลน์


    Betting online gambling reminiscent of UFASCR.COM Baccarat.
    ufabet


    UFABET football betting website, the big brother of all UEFA networks, UFADNA, with an update The first modern system in 2021
    ufa


    Web football i99PRO online lottery casino apply today for free 5000 bonus
    เว็บบอล


    Kardinal Stick Siam - Relx a great promotion. Express delivery in 3 hours.
    relx

    ReplyDelete
  3. Online football betting i99club, one of the world's leading online gambling sites, provides the best prices in football betting
    เว็บแทงบอล


    Ufabet1688 online betting website UEFA Bet is a 100% legal website with all licenses
    ufabet


    UEFA football betting, casino, slots, lottery, direct website 1688, stable financial, 100% UFABET168
    ufa


    Fan wreath shop with free delivery, with pictures before-after sending with receipt.
    พวงหรีด


    Sticking to the COVID-19 situation: Arekorenavi.info
    โควิด


    Online Baccarat FOXZ24 Easy to apply, fast, deposit-withdraw 10 seconds with the system
    บาคาร่า

    ReplyDelete
  4. Movie-watching websites that are more than movie-watching websites Because we are the number 1 free movie site in Thailand for a long time, including new movies, Thai movies, Western movies, Asian movies, we have all kinds of ways for you Including new series Full of all stories without interstitial ads to keep annoying anymore. One place sa-movie.com.

    Android and IOS operating systems. Watch online movies, Thai movies, Western movies, Asian movies, Cartoon movies, Netflix Movie, Action Movies, Comedy Movies, Crime Movies, Drama Movies, Horror Movies, Adventure Movies, Crash Movies and still have many new movies to watch. You can watch for free anytime, anywhere 24 hours a day at see4k.com.


    GangManga read manga, read manga, read manga online for free, fast loading, clear images in HD quality, all titles, anywhere, anytime, on mobile, tablet, computer. Android and IOS operating systems. Read top comics, action dramas, comedy, adventure, horror and manga. New coming every day to watch many more. Can be read for free anytime anywhere 24 hours a day at gangmanga.com..

    It is no secret that football is among the most popular and widely watched sports. Everybody who likes football tries to find the best platform for free soccer streaming. So, what are the best free sports streaming sites? We are going to answer this question. On this page, you can find a detailed overview of the most widespread soccer streaming websites. Keep on reading and make the best choice for you live24th.me.

    ReplyDelete
  5. With special privileges and services, UEFA BET offers opportunities for small capitalists. Together ufa with the best websites that collect the most games With a minimum deposit starting from just 100 baht, you are ready to enjoy the fun with a complete range of betting that is available within the website

    ufabet , our one another option We are a direct website, not through an agent, where customers can have great confidence without deception The best of online betting sites is that our Ufa will give you the best price

    หาคุณกำลังหาเกมส์ออนไลน์ที่สามารถสร้างรายได้ให้กับคุณ เรามีเกมส์แนะนำ เกมยิงปลา รูปแบบใหม่เล่นง่ายบนมือถือ คาสิโนออนไลน์ บนคอม เล่นได้ทุกอุปกรณ์รองรับทุกเครื่องมือ มีให้เลือกเล่นหลายเกมส์ เล่นได้ทั่วโลกเพราะนี้คือเกมส์ออนไลน์แบบใหม่ เกมยิงปลา

    อีกทั้งเรายังให้บริการ เกมสล็อต ยิงปลา แทงบอลออนไลน์ รองรับทุกการใช้งานในอุปกรณ์ต่าง ๆ HTML5 คอมพิวเตอร์ แท็บเล็ต สมาทโฟน คาสิโนออนไลน์ และมือถือทุกรุ่น เล่นได้ตลอด 24ชม. ไม่ต้อง Downloads เกมส์ให้ยุ่งยาก ด้วยระบบที่เสถียรที่สุดในประเทศไทย

    ReplyDelete

My Instagram