Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I detect if a website is built with React?

Tags:

reactjs

When I browse to any website on the public world wide web, for example CarGurus Canada, how can I detect is this website is built using React?

like image 522
Patrick Hund Avatar asked Sep 27 '19 11:09

Patrick Hund


Video Answer


2 Answers

Use this awesome gist

// Pase these lines into website's console ( Ctrl/Cmd + Shift + I )

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');

or use BuiltWith chrome extension

like image 158
Medet Tleukabiluly Avatar answered Oct 10 '22 09:10

Medet Tleukabiluly


Using React Developer Tools chrome extension. React's logo will light up everytime you visit a site built in React. Here's how it looks like in the site you've mentioned

enter image description here

and on SO

enter image description here

like image 25
Dupocas Avatar answered Oct 10 '22 10:10

Dupocas