Closed YerkoPalma closed 6 years ago
That's right, state
and emit
are prefixed to the constructor arguments and the cache arguments are:
state.cache(Component, 'unique-id', ...args)
I'd be happy to contribute to the choo/component docs to help get this out there.
Closing this questions because it is answered. Thanks.
This is more a question than an issue. I looked quickly at the source and though that I could pass arguments to components constructor trhough the
cache
method of the state. I tried this:But that outputted
<button>hello</button>
. And the console log with arguments in the constructor gives meIs that the intended behaviour? If that's the case, then is safe to assume that all components rendered through cache get the same signature