Silence React error about getDerivedStateFromProps (#29544)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
committed by
GitHub
parent
5b1be70ee8
commit
a32704ae5b
@@ -64,6 +64,12 @@ export default class RightPanel extends React.Component<Props, IState> {
|
||||
public static contextType = MatrixClientContext;
|
||||
declare public context: React.ContextType<typeof MatrixClientContext>;
|
||||
|
||||
public constructor(props: Props) {
|
||||
super(props);
|
||||
|
||||
this.state = RightPanel.getDerivedStateFromProps(props);
|
||||
}
|
||||
|
||||
private readonly delayedUpdate = throttle(
|
||||
(): void => {
|
||||
this.forceUpdate();
|
||||
|
||||
Reference in New Issue
Block a user