Skip to content

Commit c77d053

Browse files
committed
update readme code
1 parent 6dac4b7 commit c77d053

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

1-Authentication/1-sign-in-react/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,13 @@ To provide feedback on or suggest features for Azure Active Directory, visit [Us
211211
MSAL React should be instantiated outside of the component tree to prevent it from being re-instantiated on re-renders. After instantiation, pass it as props to your application.
212212

213213
```javascript
214+
import { createRoot } from 'react-dom/client';
215+
214216
const msalInstance = new PublicClientApplication(msalConfig);
215217

216-
ReactDOM.render(
217-
<React.StrictMode>
218-
<App msalInstance={msalInstance}/>
219-
</React.StrictMode>,
220-
document.getElementById("root")
218+
const root = createRoot(document.getElementById('root'));
219+
root.render(
220+
<App instance={msalInstance}/>
221221
);
222222

223223
export default function App({msalInstance}) {

0 commit comments

Comments
 (0)