NavigationMixin

You can use NavigationMixin instead of the navigate() and generateUrl() APIs. Both options offer the same functionality, but only NavigationMixin is compatible with Lightning Experience. If you're writing a component for use in both LWR and Lightning Experience, choose NavigationMixin.

See Also