chore: update README section for template & render

This commit is contained in:
Ayo 2023-12-02 09:49:05 +01:00
parent 6ae5961c4f
commit c3957862ad

View file

@ -99,7 +99,8 @@ This mental model attempts to reduce the cognitive complexity of authoring compo
1. The `template` is a read-only property (initialized with a `get` keyword) that represents *how* the component view is rendered.
1. There is a `render()` method that triggers a view render.
1. This `render()` method is *automatically* called under the hood every time an attribute value changed.
1. You can *optionally* call this `render()` method at any point to trigger a render if you need.
1. You can *optionally* call this `render()` method at any point to trigger a render if you need (eg, if you have private unobserved properties that need to manually trigger a render)
1. Overriding the `render()` function for handling custom a `template`--where you can return `string | Node | (string | Node)[]` is also an option. More examples on this to follow.
## Prop Access