Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logStack include component instantiation mutations #360

Merged
merged 2 commits into from
Sep 17, 2019

Conversation

cherifGsoul
Copy link
Member

Fixes #358

The changes:

Run a can-queues task a When the component is instantiated with viewModel (lowercase v).


new ComponentConstructor({
viewModel : {
foo: value.bind(this,"bar")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to use can-value?

can-component.js Outdated

//!steal-remove-start
if (process.env.NODE_ENV !== 'production') {
Object.defineProperty(setupFn, "name",{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this name needed?

can-component.js Outdated
});

setupFn = queues.runAsTask(setupFn, function(el, componentTagData) {
return ["Rendering", el, "with",el, componentTagData.viewModel];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, the component is not being rendered. The case that existed already(this one) is called when an element is inserted into a page using stache (like {{ componentInstance }}), which is why it is queued as Rendering ....

This case the element is being constructed.

Right now this message says

Rendering <a-tag>​</a-tag>​ with <a-tag>​</a-tag>​ {foo: Observation}

I think it should say something like

Constructing <a-tag>​</a-tag>​ with viewModel​ {foo: Observation}

@cherifGsoul cherifGsoul merged commit a0e2139 into master Sep 17, 2019
@cherifGsoul cherifGsoul deleted the logStack-newComponent-mutation branch September 17, 2019 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

logStack doesn't include new Component() mutations
2 participants