Forum Discussion
SPFx app customizer not loading on using browser back button
Hi,
I am having a simple SPFx app customizer to display the site owner information on all modern pages of SP2019 site.
There are links on the page that take us to different sites that run on classic mode.
Now when we try to click on back button to get back to the modern site page, the app customizer does not get displayed. But after we refresh that page once, it gets displayed.
Any idea what would be causing this issue?
- Matthias_GlubrechtMicrosoft
nayann20 , you may be facing the issue described here: Handle Navigation in SharePoint Framework Application Customizer - Nanddeep Nachan Blogs
The solution would be to add an event handler for the navigatedEvent in your onInit() method like so:
this.context.application.navigatedEvent.add(this, () => { this.loadReactComponent(); });
Let me know if the example in the referred page works for you.
Kind regards, Matthias