navbar improvements and mroe responsive on mobile
Former-commit-id: e9ccecbc5798c3bf0c0987a08b0ad4a71688f9e1
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user