You need to sign in to do that
Don't have an account?
David Benkoel 3
Page redirection best practice in a LWC
Hi,
I need to perform a simple redirect to a standard web page, from a LWC.
Is it a good practice to use the approach (and if yes why?) :
Thank you
I need to perform a simple redirect to a standard web page, from a LWC.
Is it a good practice to use the approach (and if yes why?) :
this[NavigationMixin.GenerateUrl]({ type: 'standard__webPage', attributes: { url: redirectUri } })
Thank you
Hi David,
Yes, This is the way to navigate to different pages in LWC. You will also need to import the NavigationMixin function from the lightning/navigation module in order to achieve this. For more information please find link to resource provided by salesforce. If this resolves your concern, Kindly mark it as best answer.
https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.use_navigate
Regards,
Shiraz