Performance Analysis of Hooks Functionality in React and Vue Frameworks
Performance Analysis of Hooks Functionality in React and Vue Frameworks
Abstract—Front end plays a key role in web applications performance of web applications, and the reusable
since it ensures the users have a great experience when components that React offer [3].
interacting with the interface. Hence, optimizing front-end
performance is important in building web applications. Vue.js or also known as Vue is a progressive
ReactJS and Vue JS are popular front-end frameworks that framework used also for UI development. The core library
commonly be used in developing web-based applications and of Vue is focused on view layer only, therefore making it
also introduced hooks functionality. There have been many easier to integrate with other libraries or projects. Vue.js is
debates regarding which library or framework is better also a popular choice for the development of Single-Page
between these two. Therefore, this study discusses a Applications (SPA) when combined with modern tooling
comparative study relating to the performance of ReactJS and and other supporting libraries. Vue was first created by
Vue JS frameworks, specifically focusing on hooks Evan You, whom is a former Google engineer that worked
functionality. For the study, two sample web app prototypes on Angular.js and Meteor framework [4]. Vue is also
was developed using both frameworks. The performance test popular amongst developers, especially junior front-end
of these two frameworks is utilizing an extension for Google developers. This is due to the simplicity of the framework
Chrome for, using the frameworks’ respective hooks and where developers can code with little effort yet also
standard CRD (Create, Read, Delete) - API (Application achieve satisfactory results and great components. Vue.js
Programming Interface). The result of this research shows
can also be integrated with other frameworks such as React
that React’s hooks functionality performed slightly better for
[5].
API requests and managing states on the web application.
While React.js and Vue.js have their own advantages
Keywords—react, vue, hooks, front-End, performance and disadvantages towards each other, they have a
similarity in which they have their own “hooks” in their
I. INTRODUCTION framework features. According to the official
Web development has evolved rapidly and there are documentation of React.js [10], Hooks are defined as a
several factors that support web development to the best feature that allows developer to use state and other React
outcome. One of those factors is the existence of front-end features without the use of a class. It allows developer use
frameworks. Front-end frameworks or JavaScript and modify React state and lifecycle features from function
frameworks are considered as packages that consist of pre- components.
written, homogenous codes in folder and files that assist An example of a React hook would be useState hook
developers in developing user accessibility, and ease the where it enables the developer to add and modify local
development of interactive, user-centric websites [1]. state inside a function component. It is almost similar to
Nowadays for front-end development, developers tend this.setState() in a class component. Vue.js also has their
to choose a specific front-end framework or library that own hooks where they are defined as Lifecycle hooks.
can ease their job by reducing the time to code, easier code According to the official documentation of Vue.js [11],
maintenance, better performance, and productivity and Lifecycle hooks allows developers to add code at specific
many more [2]. ReactJS and Vue.js are two of the many stages such as updating the DOM, mounting the instance
popular front-end frameworks that developers use for of the DOM and many more. An example of a Vue hook
front-end development [9]. These two frameworks have would be the mounted hook where the developer can use it
also introduced hooks in their functionality. to run code after the Vue component has finished the initial
rendering of the project.
React.js or also known as React, is a JavaScript-based
User Interface (UI) development library. React was first This study shows a comparative study relating to the
developed by Facebook in 2013 and currently run by them performance of ReactJS and Vue JS frameworks,
and an open-source developer community. React itself is specifically focusing on hooks functionality. Both of the
more of a library instead of a framework making it very above frameworks was chosen as the subjects of
flexible. React is arguably popular amongst developers. comparison since those two of those frameworks are two
This is due to React being easy to use for dynamic of the most popular JavaScript frameworks and only those
applications since it requires less coding, and use more two and few others have hooks accessible. Hence, there are
functionality, also the feature of virtual DOM (Document two web applications prototypes, which can create, read,
Object Model) manipulation which increases the and delete data developed using React.js and Vue.js. The
For development of the web application prototype API Request Method Description
GET- Get all Freelancers This API method will get the data
using Vue.js, the researcher used standard Vue components of the freelancers. The structure
for the pages in the application. After finishing the for the table in the database will
development of components, the Composition API hooks have a name, position, skills, and
was implemented to do the same things as mentioned in the domicile.
React app. POST – Add Job Offer This API method will be able to
add job offers to the database.
The structure for the table in the
database will have the
freelancer_id that connects with
the Freelancers table, job name,
job description, and the price.
DEL – Delete Job Offer This API method will be able to
delete the job offers from the
database.