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

this.child() API inside a component #6

Open
arunoda opened this issue Feb 6, 2015 · 2 comments
Open

this.child() API inside a component #6

arunoda opened this issue Feb 6, 2015 · 2 comments

Comments

@arunoda
Copy link
Member

arunoda commented Feb 6, 2015

This is very similar to the FlowComponents.child() but inside the component itself. So, we can access states and actions.

But we need to make sure, when this used inside a state, it won't get reactive. If need reactivity, we should be able to use it in this.autorun()

We can use Environment variables for this.

@arunoda
Copy link
Member Author

arunoda commented Feb 9, 2015

We need to double check whether we need to use this or not. If we did this, this will goes back to the older way for complex data flows here and there.

What we really need is a way to push some data to childComponents. Try to send a reactive variable with the params. We can find a good patterns to do that.

@ggn06awu
Copy link

It appears as though you can't actually call the actions of a child component from a parent whatever context you're in. Maybe it's worth adding this in the Template / UI context before looking to extend the ability to within a component context.

The primary use case for us is trying to reset long living form components after submission events, which seems to be either highly inelegant or requires direct DOM access (something we try to avoid).

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

No branches or pull requests

2 participants