-
Notifications
You must be signed in to change notification settings - Fork 15
tracked property (dependent on "args") in child component is out of sync #66
Comments
This change works around an issue that we discovered with tracking args. See: glimmerjs/glimmer-component#66
This change works around an issue that we discovered with tracking args. See: glimmerjs/glimmer-component#66 The issue was: The "Pay by credit card" button in stripe-checkout was initially out of sync if the user clicks a sticker's "Add to cart" button for the very first time.
Hitting the same problem |
FYI - #67 is attempting to address this issue. I believe that it is good to go, but we need another round of review... |
trying go get over glimmerjs/glimmer-component#66 bug
@chrmod @deepan83 Ack, sorry, I didn't realize we hadn't cut a new release since @robbiepitts's fix for this. @chrmod You should be able to install the dependency from GitHub for the moment to verify whether it's fixing your issue. I will cut a new release either today or tomorrow morning. We are trying to move |
@tomdale thanks for the information. I've tried building and linking I'm using glimmer without ember-cli (but with own, custom build system), so there may be other incompatible dependencies. To be honest it is very hard to figure out what exactly is need to build and run glimmer application, main reason is just the number of glimmer related repositories. So monorepo sounds like great idea for me. |
@chrmod I would bet linking is not working because you end up with two copies of |
@tomdale this is all good to know, thank you again. But how to npm install
fetches the project, but it is not build, so cannot be imported. |
I'm keenly awaiting a new release so that I can complete my video tutorial on Glimmer.js. I'd rather not have to mention anything about avoiding @tomdale if the release is blocked for some reason, please LMK if there is anything you think I or others can do to help unblock it. |
It seems that I'm hitting the same problem. I created a repo, you can find it here: https://github.com/tschoartschi/glimmer-troubles I also created a screencast which is available here: https://github.com/tschoartschi/glimmer-troubles/blob/master/screencast.mov |
@tschoartschi Can you verify the issue is resolved on 0.8.x of Glimmer.js? |
I can confirm that the issue is fixed in 0.8: |
While attempting to follow along with the glimmerjs guides, @rondale-sc and I had some difficulty using
@tracked('args')
to create a derived computed property in a child component.The guides suggest using the following to create a child component that has a computed property
multiplied
that updates when itsargs.number
changes:This seems to work as expected in the glimmer-playground (which appears to use
@glimmer/component
version 0.5.0). This is a link to a working version (with code lightly adapted from the code from the guides): http://bit.ly/2syFV7cHowever, in a new glimmer app (created using ember cli with the
@glimmer/blueprint
blueprint), using@glimmer/application
v0.7.2 and@glimmer/component
v0.6.0, the same code doesn't work correctly. Clicking the buttons updates the property shown in the template, but not the derivedmultiplied
property.Here is a link to a commit from the app that exhibits this issue:
bantic/bodega-glimmer-test@f296b4f
Expected behavior: Clicking "number: 2" immediately changes the template to display "multiply: 4 (@Number: 2)".
Actual behavior: On the first click, the
@number
text updates (to"@number: 2"
), but the "multiply" text does not (i.e. `"multiply: 2 (@Number: 2)"). Clicking the same button a second time causes the template to display the expected output.The text was updated successfully, but these errors were encountered: