Comments (13)
This happens for me with a single {{#each}}
too:
import Component from "@glimmer/component";
export default class MyApp extends Component {
speakers = ['Tom', 'Yehuda', 'Ed'];
}
"@glimmer/application": "^0.4.0",
"@glimmer/application-pipeline": "^0.5.2",
"@glimmer/component": "^0.3.8",
"@glimmer/resolver": "^0.3.0",
from glimmer-application.
It seems that component.args = bucket.namedArgsSnapshot();
results in a propertyDidChange
for args
, which then causes a subsequent rerender. args
are tracked here.
from glimmer-application.
Related, we seem to rerender
twice at boot time for an app with static content:
from glimmer-application.
@chadhietala I believe you were looking into some of this?
from glimmer-application.
@tomdale this is what I was talking about. We need to check the global revision before we schedule a re-render.
from glimmer-application.
@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. 😉
from glimmer-application.
This is a weird case because we want args
to invalidate other tracked properties, but not schedule a rerender.
from glimmer-application.
@tomdale Is there anything that has to be done beyond removing args tracking?
I did that and added a test for the rerender loop (CvX/glimmer-component@13456a9).
All tests pass, but maybe there are some other args-related functionalities that were never tested?
I'd really like to squash this bug. 😃
from glimmer-application.
@tomdale To clarify, we currently have to do @tracked('args')
as we cannot track individual attributes, like @tracked('args.rating')
, right? (I tried that and it didn't work but perhaps I was missing something?)
from glimmer-application.
@balinterdi You're completely right, forgot about that use case.
Updated the test and added dirtying the args tag. CvX/glimmer-component@a8aaa2b
from glimmer-application.
@CvX Does it work now? It's still a workaround, though, isn't it? (And we should be able to track individual properties.)
from glimmer-application.
@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.
from glimmer-application.
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!
from glimmer-application.
Related Issues (20)
- Documentation for running multiple apps on the same page HOT 1
- Helper runs every few milliseconds after a tracked property changes HOT 1
- Things That Need To Be Fixed HOT 3
- Can't use `async` / `await` out of the box HOT 3
- Sourcemaps seem to have issues HOT 4
- Document (and improve) using npm packages HOT 3
- Ergonomics / Polish / Initial Experience "Punch List" HOT 2
- Accessing ENV HOT 1
- Advanced helpers HOT 1
- `renderComponent` doesn't accept args or attributes HOT 3
- userland files HOT 1
- ember-cli-deploy doesn't work with latest glimmer-application HOT 1
- Argument and property naming conflict HOT 7
- Docs lacking: how do I use Glimmer as a view layer for my app? HOT 1
- Nested components don't appear to work as documented HOT 2
- Tracked property on a service doesn't invalidate tag HOT 1
- `@tracked('args')` in component nested within a `{{#each}}` seem to invalidate with old values HOT 2
- `renderComponent` options API proposal HOT 3
- Return value of an action argument to a component always seems to be undefined for me
- Running `ember test` on a Glimmer App breaks if run on BashOnWindows HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glimmer-application.