We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a0ed08 commit da0221cCopy full SHA for da0221c
source/views/transportation/bus/line.js
@@ -119,12 +119,12 @@ function deriveFromProps({line, now}: Props) {
119
}
120
121
export class BusLine extends React.Component<Props, State> {
122
+ state = deriveFromProps(this.props)
123
+
124
static getDerivedStateFromProps(nextProps: Props) {
125
return deriveFromProps(nextProps)
126
127
- state = deriveFromProps(this.props)
-
128
shouldComponentUpdate(nextProps: Props) {
129
return (
130
this.props.now.isSame(nextProps.now, 'minute') ||
0 commit comments