React 测试一个网站是否用了 react.js

Rei · February 27, 2015 · Last by zhenyuchen replied at July 25, 2015 · 9253 hits

https://twitter.com/floydophone/status/557348616080076800

在浏览器终端输入:

setInterval(function() { Array.prototype.slice.call(document.querySelectorAll('[data-reactid]')).forEach(function(element) { element.style.background = 'rgba(255,0,0,0.1)'; }) }, 500)

例如:

https://www.facebook.com/ (登录后) https://instagram.com/ (登录后) https://www.airbnb.com.au/go/US

變色了

如果用了 prerendering 就不一定能看出来了

react 生成的 html 太有特点了,一堆data-reactid这样的东西

You need to Sign in before reply, if you don't have an account, please Sign up first.