DEV Community

Cover image for React
Enid Nyatichi
Enid Nyatichi

Posted on

React

This week I was able to create a TV show react app. The application allows users to choose movies from a list and view information about them. The app has three routes: the home,login and search route. The home route displays the list of movies when a user searches using any keyword and on tapping a particular show the user can be able to see the genre,rating,screening status,official site and some brief description of the movie. The search route displays a text-box where users can enter their search query which then searches for movies matching that query and displays them in regards to the keyword entered.The login route basically is the page where a use sign up if they don,t have an account,log in if they have an account and also sign out.
I achieved all the above using React.This was a new experience for me because I have never created a react application before so I had to learn so many concepts in react.The advantage of using react in building applications is that you create single paged applications which means that they have a single HTML file containing all the content of the application. This type of application is advantageous because it is easy to maintain and provides an instant response to user interaction.The app can be used on both desktop computers as well as mobile devices such as smartphones or tablets.In this blog I'm going to take you through react and various concepts in react.

React is a JavaScript library for building user interfaces.React was first developed in 2011 at Facebook as part of the company's internal toolkit for the development of web applications. The library was open-sourced in 2013 under a BSD license and has since become one of the most popular front-end libraries in use today. React has a declarative, efficient, and flexible approach to building user interfaces.It is used for handling the view layer of an application, and can be used to build both websites and mobile apps.Most people confuse it for being a framework.However,it is not a framework, but it has a few features that make it easier to build web apps with.
React uses a virtual DOM to efficiently update the actual DOM. React provides a set of powerful features that make it easy to build large, complex applications with data that changes over time.
React uses what we call components which are one of the most important parts of React. They are created with JSX, a syntax extension to JavaScript that allows us to declare what our UI should look like in HTML-like syntax.Components are independent and self-contained, they can be reused throughout your app and they can be updated easily without affecting the rest of the app.
There are new features that simplifies how you can use React with state and lifecycle. These features are called hooks.The React Hooks API is a new feature that was introduced in React 16.8. It has been created to address the problems of useState and useEffect, which are two other features that were introduced in React 16.7.Hooks provide a way to declare functions that can be called by other components, even those outside of the component’s hierarchy.They also give you more control over when the component should update and how it should update by making it possible for you to specify the lifecycle hooks that your component will react on.
Another important aspect of react is routing.React routing is an open source JavaScript library that helps developers create single page applications with ease.It helps in managing the URL,navigational links and to add new routes.
With all these, I would like to say that React is a very nice library because of its simplicity and ease of use and everyone should try it out.

Top comments (1)

Collapse
 
andrewbaisden profile image
Andrew Baisden

You can make this article more readable with some paragraphs 😊