Coder Social home page Coder Social logo

Comments (2)

STRML avatar STRML commented on May 22, 2024

Yeah, it appears they may be removing isMounted() - best I can tell is
that they say it won't work inside ES6 classes, but I haven't gotten any
coherent reason as to why, or why it would be removed.

We use it to switch to CSS transforms after mounting which have better
performance, but it is not possible to do this effectively on the
server-side. This is because CSS transforms don't support percentage
offsets - while top and left percentage values are equal to their
container ("move this element down 40% of its container's height"),
percentages with CSS transforms are relative to themselves ("move this
element down 40% of its own height"), which is not useful.

Since we don't know the browser's width on the server this leads to
breakage on initial load until the JS has time to run. I didn't want to
turn this into yet another app that shows a "loading..." screen, I want
the layout to be correct when starting, so that's why we use this. It's
not enough to simply check process.browser, because otherwise the
layout will fail the checksum.

On 3/23/15 8:42 AM, Sune Kibsgaard Pedersen wrote:

The console gives me a warning that "ReactGridLayout is accessing
isMounted inside its render()"
I know this doesn't affect the grid, but maybe in a later React
version, this will become a real issue.

Only tested using React 0.13


Reply to this email directly or view it on GitHub
#38.

from react-grid-layout.

kibs avatar kibs commented on May 22, 2024

Ahh makes sense, didn't really think about serverside. Didn't really think you didn't know, as you probably also are using the console 😉 but couldn't find an issue, so I thought I would ask.

Thank you for the detailed answer, and thank you for this really great project!

from react-grid-layout.

Related Issues (20)

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.