navbar improvements and mroe responsive on mobile

Former-commit-id: e9ccecbc5798c3bf0c0987a08b0ad4a71688f9e1
This commit is contained in:
Benjamin Kyd
2022-03-26 14:03:49 +00:00
parent 8bb0b9bbaa
commit 362f5cf048
9 changed files with 83 additions and 50 deletions

View File

@@ -60,6 +60,15 @@ class MyComponent extends Component {
super(MyComponent);
}
Update() {
return new Promise((resolve, reject) => {
setTimeout(() => {
this.state.name = 'Hello World';
resolve();
}, 1000);
});
}
Render() {
return {
template: SideLoad('MyComponent.html'),
@@ -81,4 +90,8 @@ State is updated with `setState()`.
Within the HTML, any instance of `{this.state.}` will be replaced with
the internal state of the component.
The `Update` method is called when the global state or the attribute
state changes, and is expected to modify the internal state before
rendering.
TODO: Global state