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

Automatically make "this.config.children" accessible directly on "this.children". #118

Closed
ethib137 opened this issue May 26, 2016 · 3 comments

Comments

@ethib137
Copy link

Can we make children available directly on the component instead of having to access them through the config or manually add "children" to Component.STATE = {}.

This would be treating children in a similar way to elementClasses.

It would be great if we could also apply the metal-state-validator for array when it is a JSX component.

Do you see any negatives to this?

@mairatma
Copy link
Contributor

It'd be fine to make children be a state property automatically for JSXComponent. I think we should avoid using metal-state-validator there though, since the idea is to have it be an optional library that people can use if they want a behavior more similar to react, but not to have it as a Metal.js default. Would that be ok?

@ethib137
Copy link
Author

Yeah, that's fine... using the metal-state-validator isn't essential. Thanks.

@mairatma
Copy link
Contributor

Done here. After updating the dependency you'll be able to use this already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants