mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[REM] component: remove PureComponent
This commit is contained in:
@@ -438,21 +438,3 @@ export class Component<
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export class PureComponent<E extends Env, P, S> extends Component<E, P, S> {
|
||||
shouldUpdate(nextProps: P): boolean {
|
||||
for (let k in nextProps) {
|
||||
if (nextProps[k] !== this.props[k]) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
async updateState(nextState: Partial<S>) {
|
||||
for (let k in nextState) {
|
||||
if (nextState[k] !== this.state[k]) {
|
||||
return super.updateState(nextState);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
export { Component, PureComponent } from "./component";
|
||||
export { Component } from "./component";
|
||||
export { EventBus } from "./event_bus";
|
||||
export { QWeb } from "./qweb";
|
||||
export { connect, Store } from "./store";
|
||||
|
||||
Reference in New Issue
Block a user