work on menu data/home menu/navbar/routing

This commit is contained in:
Géry Debongnie
2019-02-04 13:23:41 +01:00
parent b292a66523
commit 70b25fc7b8
14 changed files with 162 additions and 74 deletions
+3
View File
@@ -174,6 +174,9 @@ export class Widget<T extends WEnv, Props> extends EventBus {
* case, it will simply update the state and will not rerender
*/
async updateState(nextState: Object) {
if (Object.keys(nextState).length === 0) {
return;
}
for (let key in nextState) {
if (key in this.state) {
this.state[key] = nextState[key];