Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to tell if a web application is using ReactJs

I know there are tools like Wappalyzer & BuiltWith that give you information about which framework or library is used in a website. But I need some kind of proof regarding if ReactJs is really used in a website.

After some research I found out that commands like typeof React or window.React.version, but these commands don't work all the time.

Any ideas on how to check reactJs is used a web application?

like image 533
Melchia Avatar asked Jun 29 '19 12:06

Melchia


People also ask

How do you identify a project React?

The other method is also straightforward, you can check the React app version by heading over to node_modules/react/cjs/react. development. js. You can see the react project version in the commented section as showing given below.

Is React used for web applications?

React was made by Facebook to rewrite its giant and ever-growing social networks, so it can support large web applications by design.


2 Answers

try the below snippet, thanks for the examples for each site listed by rambabusaravanan. See the below link

if(!!window.React ||
   !!document.querySelector('[data-reactroot], [data-reactid]'))
  console.log('React.js');

if(!!window.angular ||
   !!document.querySelector('.ng-binding, [ng-app], [data-ng-app], [ng-controller], [data-ng-controller], [ng-repeat], [data-ng-repeat]') ||
   !!document.querySelector('script[src*="angular.js"], script[src*="angular.min.js"]'))
  console.log('Angular.js');

if(!!window.Backbone) console.log('Backbone.js');
if(!!window.Ember) console.log('Ember.js');
if(!!window.Vue) console.log('Vue.js');
if(!!window.Meteor) console.log('Meteor.js');
if(!!window.Zepto) console.log('Zepto.js');
if(!!window.jQuery) console.log('jQuery.js');

you can find additional info here link

like image 51
Learner Avatar answered Oct 06 '22 01:10

Learner


I had the same problem, and in my case, I found it better to rely on the React Developer Tools.

You can install it in Google Chrome, access the website you want to check, and open the Chrome DevTools.

If the website uses React, the React Developer Tools will include two tabs in the Chrome DevTools:

Chrome DevTools with React

Otherwise, the React Developer Tools won't include the tabs:

Chrome DevTools without React

like image 44
Nícolas Iensen Avatar answered Oct 05 '22 23:10

Nícolas Iensen