nanocomponent icon indicating copy to clipboard operation
nanocomponent copied to clipboard

component.use

Open yoshuawuyts opened this issue 8 years ago • 2 comments

As per our talk 2 weeks ago, it'd be useful to start thinking of component.use().

The goal of this API would be to provide a way to extend components the way we extend choo with app.use().

Not quite sure on the API yet, but got a hunch that using an internal event emitter would be the way to go for this. Input very welcome!

yoshuawuyts avatar Aug 07 '17 15:08 yoshuawuyts

Maybe provide a function that gets a copy of this/self and emit that emits lifecycle events?

bcomnes avatar Aug 07 '17 16:08 bcomnes

yes! component middleware!

ungoldman avatar Aug 07 '17 17:08 ungoldman