GithubHelp home page GithubHelp logo

Comments (5)

crapthings avatar crapthings commented on May 30, 2024

have u tried wrap your yield with #isolate?

{{#isolate}}
    {{yield}}
{{/isolate}}

from iron-router.

scottmcpherson avatar scottmcpherson commented on May 30, 2024

@crapthings
Yeah, I tried that and It didn't work. I could be wrong, but I think isolate is used to isolate redraws when reactive data sources change. I know that there is a way to sort of accomplish what I'm trying to do using the following approach with the dev branch:

<body>
  <div id="sideBar">
      <a href="#">Link One</a>
      <a href="#">Link Two</a>
  </div>

  <div>
    {{renderRouter}}
  </div>
</body>

The only problem with this approach is that it removes my sideBar from a template altogether.
Anyways, not that big of a deal, and I'm sure it's been thought about. Just wanted to throw my perspective out there.

from iron-router.

cmather avatar cmather commented on May 30, 2024

@scott-mcpherson, Agreed that smarter yield rendering is needed. Currently, all yield regions are cleared on each route dispatch. But we could be smarter about it and say if the new route calls render on the same region again, with the same template, we don't clear it. I'm not certain how we'd handle the new data context though. If the top level data context changes, we have to re-render, since that's the context passed in to the Meteor template function. It's something I'm thinking about. If you have the inclination to look at the code it would be great to have some additional eyes/ideas on it.

from iron-router.

scottmcpherson avatar scottmcpherson commented on May 30, 2024

@cmather, Sounds good. I should have some time this weekend to check out the code.

from iron-router.

cmather avatar cmather commented on May 30, 2024

Take a look at the dev branch. The new PageController class handles rendering layouts, templates and storing a global data context. Should make things a lot more efficient.

from iron-router.

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.