mirror of
https://github.com/bendtherules/is-nifty-open.git
synced 2026-08-19 00:32:31 +00:00
Fix dateswitchbar using setState before mount problem
This commit is contained in:
@@ -6,7 +6,6 @@ export class DateSwitchBar extends React.Component<{}, { rotated: boolean }> {
|
|||||||
|
|
||||||
constructor(props: {}) {
|
constructor(props: {}) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = { rotated: false };
|
|
||||||
|
|
||||||
this.willBeCreated(props);
|
this.willBeCreated(props);
|
||||||
}
|
}
|
||||||
@@ -16,7 +15,7 @@ export class DateSwitchBar extends React.Component<{}, { rotated: boolean }> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
willBeCreated(props: {}) {
|
willBeCreated(props: {}) {
|
||||||
this.setState({ rotated: false });
|
this.state = { rotated: false };
|
||||||
}
|
}
|
||||||
|
|
||||||
afterUpdated() {
|
afterUpdated() {
|
||||||
|
|||||||
Reference in New Issue
Block a user