Code Monkey home page Code Monkey logo

react-frame's People

Contributors

airamrguez avatar joepvl avatar mzdon avatar wangzuo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

react-frame's Issues

Random errors on unmountComponentAtNode

Hi, I'm rendering the frame component inside a portal (actually 2 iframes inside 2 different portals), and sometimes I get an error and the component unmounts:

Uncaught Invariant Violation: unmountComponentAtNode(...): Target container is not a DOM element.

react-dom.development.js:506 Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.
    in Reactiifyer (created by App)
    in App

package.json:

    "react": "^16.8.6",
    "react-dom": "^16.8.6",
    "react-frame": "^2.2.19",

Not really sure what's the cause of the error.

React v15.0.1 warning

Thrown at: ReactDOM.render(this._children, this.body);

render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.

Style tag inserted in head before <link> stylesheets (on IE browsers)

Hey,

I am using newest version of this component. It works great but I found one little issue. In my iframe I have base styles in files and few customized added to iframe via css prop. On IE style tag is the first element in head - on other browsers is after link tags.

Right now I use setTimeout to delay adding style to head but maybe someone know better solution.

renderFrame: function renderFrame() {
    var frame = ReactDOM.findDOMNode(this);
    this.head = frame.contentDocument.head;
    this.body = frame.contentDocument.body;

    this.updateStylesheets(this.props.styleSheets);
    setTimeout(function(){
      this.updateCss(this.props.css);
    }.bind(this),0);

    ReactDOM.render(this._children, this.body);
}

If reload it renders twice

Thanks for this great library. On the demo page, if I hit reload, I'm using Firefox, it renders twice.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.