-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider renaming renderCallback function (to render) #5
Comments
I choose the name because it was consistent with other web components callbacks like connectedCallback(). Maybe @justinfagnani has opinions? |
in his example at cds he used render |
I saw that, but that doesn't mean a lot of though was giving about that name :-) Like it could matter to be consistent with web components, or it might even be bad as it makes standardization harder (have to avoid clashes). I am fine both ways, but I think it is good to have the discussion early |
I agree... and great work btw... litElement is super useful |
I did put some thought into using In one set of mixins I was using, invalidate simply called an abstract const Render = (base) => class extends base {
async invalidate() {
if (!this.needsRender) {
this.needsRender = true;
this.needsRender = await false;
this.renderCallback();
}
}
} And then the LitRender mixin implemented const RenderLit = (base) => class extends base {
renderCallback() {
render(this.render(), this.shadowRoot);
}
} The reason for this split is 1) the platform's |
PR here: #7 |
I think you should consider renaming the render-function to be just render, to align with libraries like react (and Justins example from CDS).
its not a big deal, but easier now than when this catches on..
(great work btw)
The text was updated successfully, but these errors were encountered: