Skip to content

Commit 1575696

Browse files
committed
react work
1 parent 5e451fb commit 1575696

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

msal-javascript-conceptual/react/hooks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.author: emilylauber
1010
ms.reviewer: dmwendia, cwerner, owenrichards, kengaderdus
1111
---
1212

13-
# Hooks
13+
# Hooks in MSAL React
1414

1515
Hooks in MSAL React are functions that let you use MSAL features and React state and lifecycle methods inside functional components. The main hooks are `useAccount`, `useIsAuthenticated`, `useMsal`, and `useMsalAuthentication`. This article will walk you through how to use each of these hooks.
1616

msal-javascript-conceptual/react/performance.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ If your application is doing all of the things above you can override the method
2626

2727
**Note:** We recommend `MsalProvider` is rendered above your `Route` components and your `navigateInternal` function returns `false`. When `navigateInternal` returns false the tokens will be processed immediately after navigation. If `MsalProvider` is re-rendered as a result of navigation, your `navigateInternal` function should return `true` so that tokens are processed as a part of the re-render.
2828

29-
### Example Implementation
29+
## Example Implementation
3030

3131
Each router has their own method for doing client-side navigation and depending on how they expose the method you may need to refactor your application to support this feature. The example below will show how to implement this for `react-router-dom`. You can find a full sample apps that implement this for [react-router-dom](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-react-samples/react-router-sample), [Next.js](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-react-samples/nextjs-sample) and [Gatsby](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-react-samples/gatsby-sample).
3232

33-
> :information_source: Samples mentioned above make use of `react-router-dom` v6. If you would like to use `react-router-dom` v5 instead, please refer to: [react-router-sample](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/cf3dc599adc36d1c4460bcf7d8185c9beb5283f3/samples/msal-react-samples/react-router-sample/src/App.js).
33+
These samples mentioned above make use of `react-router-dom` v6. If you would like to use `react-router-dom` v5 instead, please refer to: [react-router-sample](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/samples/msal-react-samples/react-router-sample/src/App.js).
3434

35-
#### INavigationClient Implementation
35+
### INavigationClient Implementation
3636

3737
```javascript
3838
import { NavigationClient } from "@azure/msal-browser";
@@ -62,7 +62,7 @@ class CustomNavigationClient extends NavigationClient{
6262
}
6363
```
6464

65-
#### Providing your custom NavigationClient to `@azure/msal-browser`
65+
### Providing your custom NavigationClient to `@azure/msal-browser`
6666

6767
```javascript
6868
import { MsalProvider } from "@azure/msal-react";

0 commit comments

Comments
 (0)