Enable React StrictMode (#28258)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
committed by
GitHub
parent
bdf0f1dcc3
commit
da5c97f9fa
@@ -9,7 +9,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import * as ReactDOM from "react-dom";
|
||||
import * as React from "react";
|
||||
import React, { StrictMode } from "react";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
import * as languageHandler from "../languageHandler";
|
||||
@@ -105,7 +105,9 @@ export async function showError(title: string, messages?: string[]): Promise<voi
|
||||
"../async-components/structures/ErrorView"
|
||||
);
|
||||
window.matrixChat = ReactDOM.render(
|
||||
<ErrorView title={title} messages={messages} />,
|
||||
<StrictMode>
|
||||
<ErrorView title={title} messages={messages} />
|
||||
</StrictMode>,
|
||||
document.getElementById("matrixchat"),
|
||||
);
|
||||
}
|
||||
@@ -116,7 +118,9 @@ export async function showIncompatibleBrowser(onAccept: () => void): Promise<voi
|
||||
"../async-components/structures/ErrorView"
|
||||
);
|
||||
window.matrixChat = ReactDOM.render(
|
||||
<UnsupportedBrowserView onAccept={onAccept} />,
|
||||
<StrictMode>
|
||||
<UnsupportedBrowserView onAccept={onAccept} />
|
||||
</StrictMode>,
|
||||
document.getElementById("matrixchat"),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user