Change the mount property to behavior and allow multiple mounts
matthewp opened this issue · comments
Matthew Phillips commented
I think this is a better API
class Counter {
static inputProperties = ['--start-count'];
bind(props) {
let count = this.state.count || props.get('count');
return sheet`
.count {
text: ${count};
}
`;
}
}
sheet`
#app {
behavior: mount(${Counter}), mount(${SomethingElse});
}
`
This will allow:
- Multiple mounts on the same element for mixin like behavior.
- Other types of behaviors (maybe lower-level than a mount).