-
Notifications
You must be signed in to change notification settings - Fork 13
nested each causes endless rerender #43
Comments
This happens for me with a single import Component from "@glimmer/component";
export default class MyApp extends Component {
speakers = ['Tom', 'Yehuda', 'Ed'];
} <ul>
{{#each speakers key="@index" as |speaker|}}
<li>{{speaker}}</li>
{{/each}}
</ul>
|
It seems that |
Related, we seem to {{!-- template.hbs --}}
<div>
hello
</div> |
@chadhietala I believe you were looking into some of this? |
@tomdale this is what I was talking about. We need to check the global revision before we schedule a re-render. |
@chadhietala Nope. Args is a watched property, so setting it is causing it to rerender. It also means the current revision is getting bumped. As we talked about. 😉 |
This is a weird case because we want |
@tomdale Is there anything that has to be done beyond removing args tracking? |
@tomdale To clarify, we currently have to do |
@balinterdi You're completely right, forgot about that use case. |
@CvX Does it work now? It's still a workaround, though, isn't it? (And we should be able to track individual properties.) |
@balinterdi it does its job, but whether it should land on master in this form is a question for someone with more (ie. any 😁) experience with glimmer code. Don't know what's the plan for tracking individual properties. |
This repo has been merged with glimmerjs/glimmer.js (into a monorepo setup). I am not sure if this issue is still applicable, but if you could confirm it is still an ongoing concern and open it over there that would be very helpful. Sorry for the noise, but thank you for your help! |
If I have nested each helpers like so:
I can see endless re-renders in the timeline. Not sure if this is WAI.
Maybe it can happen with single each as well. (cc @GavinJoyce)
Simple reproduction repo is here: https://github.com/MartinMalinda/glimmer-endless-render
The text was updated successfully, but these errors were encountered: