mirror of
https://github.com/chinchang/web-maker.git
synced 2025-07-10 08:26:19 +02:00
Console: Make it pure
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import { h, Component } from 'preact';
|
||||
import { Inspector, chromeDark } from 'react-inspector';
|
||||
import { Trans } from '@lingui/macro';
|
||||
import { PureComponent } from 'preact-compat';
|
||||
|
||||
class LogRow extends Component {
|
||||
shouldComponentUpdate() {
|
||||
@ -22,7 +23,7 @@ class LogRow extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
export class Console extends Component {
|
||||
export class Console extends PureComponent {
|
||||
componentWillUpdate(nextProps) {
|
||||
if (nextProps.logs != this.props.logs) {
|
||||
// Scroll down after new log dom is inserted
|
||||
|
Reference in New Issue
Block a user