A console registering certain objects, for example, this.refs or a window object, causes a TypeError: cyclic object value error in the terminal.
My code is pretty simple: I'm trying to change the html on a web page (by putting a responsive component in it).
Main.js:
var pageMod = require("sdk/page-mod"); var self = require("sdk/self"); var { MatchPattern } = require("sdk/util/match-pattern");
testing.js:
var AppContainer = React.createClass({displayName: "AppContainer", componentDidMount: function() { console.log(this.refs.myRef); console.log(window); }, render: function() { console.log('rendering'); return ( React.createElement("div", {ref: "myRef"}) ); } }); React.render(React.createElement(AppContainer, null), document.getElementById('content'));
After running cfx run logs in the cfx run component do not display anything in the browser console, and the cyclic object value displays (tries to register the window object in the console). Why is he having difficulty?
reactjs firefox-addon firefox-addon-sdk
Blossoming_Flower
source share