How To Tell If A Web Application Is Using Reactjs
Solution 1:
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
Solution 2:
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:
Otherwise, the React Developer Tools won't include the tabs:
Solution 3:
There is an extension in Chrome named 'React Developer Tools' which allows you to inspect the React component hierarchies in the Chrome Developer Tools
https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi
There is also another extension named 'React-detector' as well :)
https://chrome.google.com/webstore/detail/react-detector/jaaklebbenondhkanegppccanebkdjlh
Solution 4:
Following @DILEEP THOMAS answer:
For Angular (component based) use this code:
if (
window.hasOwnProperty("ng") &&
window.ng.hasOwnProperty("coreTokens") &&
window.ng.coreTokens.hasOwnProperty("NgZone")
) {
console.log("Angular");
}
Run the code in the console on the following webpages:
Web pages/apps which use Angular2+ are: https://www.samsung-forward.ru/, https://www.delta.com/
Stackoverflow.com seems not to be using it.
Post a Comment for "How To Tell If A Web Application Is Using Reactjs"