Conversation
| "musicmetadata": "^2.0.4", | ||
| "nanobus": "^4.1.0", | ||
| "nanocomponent": "^5.0.1", | ||
| "nanocomponent": "^6.0.0-0", |
There was a problem hiding this comment.
what's going on with the choo & nanocomponent release numbers? sub-patch releases now? 🤡
There was a problem hiding this comment.
Believe it or not I didn't know about https://docs.npmjs.com/getting-started/using-tags
Anyway, we have a 'beta' release that you can install with nanocomponent@next and choo@next.
| } | ||
|
|
||
| _update () { | ||
| return compare(arguments, this._args) |
There was a problem hiding this comment.
Good or bad interesting? this._args should probably be this.lastArgs
There was a problem hiding this comment.
mainly just undocumented 😝
One thing I do continue to find odd is that all the class/prototype methods are underscore-prefixed which usually indicates private variables & methods that shouldn't be overridden, whereas these are in practice methods that are public and specifically meant to be overridden (or required to be defined in the case of _render).
There was a problem hiding this comment.
Im at sea on the _s too. The idea is that anything with a _ aren't intended to be called on instances. If you want, take a pass at a nanocomponent's api or our components to come up with a better convention.
There was a problem hiding this comment.
this._args could easily be made public at this.prevArgs
There was a problem hiding this comment.
Bret Comnes Idea: Any property or method users interact with should not be _'d. Users implement .createElement and .update instead of _render and _update. .render stays as .render. We expose a few more properties e.g. this._args -> this.lastArgs
12:52 _hasWindow -> hasWindow
12:52 maybe
12:52 would make upgrading more painful
New messages
12:52 bret: oh, I like that!
12:52 bret: yeah; user implements createElement
12:52 woot!
What do you think @ungoldman ?
There was a problem hiding this comment.
@bcomnes so what does createElement mean, and how is it different from render?
This makes the necessary changes to use the new nanocomponent. Farewell cache-component.