Git Product home page Git Product logo

Comments (5)

cramforce avatar cramforce commented on May 6, 2024

This is typically only desirable for server side rendering. Since our initial goal is to support existing templating languages those could just use their existing string generation instead.

from incremental-dom.

kesne avatar kesne commented on May 6, 2024

Dust.js is a pretty popular templating engine with asynchronous support. I'm sure there are other engines out there that support async rendering as well.

from incremental-dom.

cramforce avatar cramforce commented on May 6, 2024

@kesne Oh, I've implemented a few of those myself. Just saying it is typically a very bad idea on the client because it leads to uncontrollable re-layouts.

If this comes up as something people want we can make something like this work

elementOpen('div', '', null);
var context = saveContext();
setTimeout(function() {
  restoreContext(context);
  text('hi');
  elementClose('div');
}, 1000);

But I don't see very high priority.

from incremental-dom.

sparhami avatar sparhami commented on May 6, 2024

I would also be concerned about people potentially kicking off a second render while the first is in progress, which could lead to strange behavior.

One reason why I think async rendering generally isn't handled by virtual DOM implementations is that invoking a render again when you have more data usually isn't too bad.

from incremental-dom.

kesne avatar kesne commented on May 6, 2024

@cramforce I see your concern with it now. I think it's only dangerous if you don't have some sort of control between when re-layouts occur. Though I understand it being low-priority or generally out of scope for the project.

@sparhami That's true, I guess that's the alternative approach to this. Though if you have a cascading async layout it might get less-than-ideal. Although I guess if your site is structured like that you probably have bigger problems...

from incremental-dom.

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.