Use purecomponent

Co-Authored-By: Travis Ralston <travpc@gmail.com>
This commit is contained in:
Jorik Schellekens 2020-04-28 14:00:15 +01:00 committed by GitHub
parent bfba5e6cfe
commit a8407c9508
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -116,7 +116,7 @@ type DotIProps = {
disabled: boolean; disabled: boolean;
} }
class Dot extends React.Component<DotIProps> { class Dot extends React.PureComponent<DotIProps> {
render(): React.ReactNode { render(): React.ReactNode {
let className = "mx_Slider_dot" let className = "mx_Slider_dot"
if (!this.props.disabled && this.props.active) { if (!this.props.disabled && this.props.active) {