Dependency which helps you navigating with SPFx
npm install spfx-navigation
SharePoint Framework handles it own navigation events. If you want to redirect from your code to another page, it will trigger a full page reload when you use location.href = ". This dependency allows you to define how you want to navigate to the page with partial or full page reloads.
Run the following command to install the spfx-navigation dependency:
```
npm i spfx-navigation -S -E
Once the dependency is installed to your project, you can make use of it as follows:
`typescript
import { Navigation } from 'spfx-navigation';
/ Navigation with partial page reload /
Navigation.navigate("
/ Navigation with full page reload /
Navigation.navigate("
``
Experiencing issues? Please add these to the dependency its issue list: SPFx navigation issues.
- Fix build in the GitHub workflow