Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
December 11, 2020 09:14 am GMT

How is React different from vanilla JS

Vanilla Js

VanillaJS is a name to refer to using plain JavaScript without any additional libraries. All major web browsers have a built-in JavaScript engine that executes the code on the user's device. It is the language to communicate with the browsers directly. Let it be any framework Angular, React, etc they are all built on top of vanilla JS. When making small web apps using vanilla JS or any of the framework wouldn't make any big of a difference. But when there are more functionalities to be added code gets messier.

React

It is a framework built on vanilla JS. Think of it as the middleware to communicate with the browser. Modern browsers provide many functionalities that improve user experience and provide good visual animations also. To communicate with the browser we use vanilla JS. But the code gets many times too long making things look complicated in vanilla JS. React hides these complexities and let a developer access the features of the browser using less code. Also, I would like to remind you here that React is a declarative language for this reason.

React is a Component-Based framework. This means components are once written and used multiple times within the app. In vanilla JS it is not the same case as everything has to be hard-wired to make things work.

React can also render on the server using Node and power mobile apps using React Native.Many companies use React Native for their mobile app because the same code can be deployed to both Play Store and App Store.This helps them ship out new features and information to their users in less time.

I hope that this article helped you learn something new today. If it did you can follow me on Twitter, to stay connected.


Original Link: https://dev.to/amansethi00/how-is-react-different-from-vanilla-js-4lfn

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To