(no title)
mikebelanger | 9 months ago
Tbh, I'm not sure there's a way for that. But why not just define a method in your target child component and pass the worker in there?
mikebelanger | 9 months ago
Tbh, I'm not sure there's a way for that. But why not just define a method in your target child component and pass the worker in there?
MrJohz|9 months ago
You can use properties (as opposed to attributes) as I demonstrated, and you can use methods like you suggest, but these are both verbose and limited, and add an extra "the component has been created but the props haven't been fully passed" state to the component you're writing. Imagine a component with maybe five different props, all of which are complex objects that need to be passed by property. That's a lot of boilerplate to work with.
spankalee|9 months ago
You can set them declaratively with a template binding in most template systems.