Timeline for Problem with navigating to LWCs wrapped in aura component
Current License: CC BY-SA 4.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 17, 2020 at 8:07 | comment | added | arut | Approach 1 vs Approach 2 is just a matter of preference based on the business requirements. Your use case can be implemented in either of these. If you use Approach 2, you would use screen elements that is best suited for user guidance scenario and comes with a previous, next & finish buttons. You would also have flow variables which can be used to capture the input & output data between various components. In Approach 1, you would do the same using custom events to send data from child components to parent & public methods to call child comp methods from parent. | |
Nov 17, 2020 at 8:01 | comment | added | arut |
I don't see any performance advantage of using events over NavigationMixin.Navigate . While NavigationMixin will still work for your case, its primarily built to navigate to different pages (based on page type & by manipulating the PageReference JS object). I don't see a point in using this if the user is going to be staying on the same page for all the LWCs (unless there is valid use case not mentioned in your question). In fact, Approach 1 mentioned in your comment is well suited for your use case IMO, thereby eliminating Aura comp & building everything on LWC.
|
|
Nov 17, 2020 at 7:36 | history | bounty ended | Koustubh | ||
Nov 17, 2020 at 7:34 | comment | added | Koustubh | I also looked at alternate approaches which will eliminate the use of aura component for navigation. Approach 1: Use parent LWC and embed child LWCs inside it -Link. Approach 2: Use Flows to navigate between LWCs -Link. Please provide short feedback on these approaches. Thanks again! | |
Nov 17, 2020 at 7:31 | vote | accept | Koustubh | ||
Nov 17, 2020 at 7:31 | comment | added | Koustubh |
It works! Thanks a lot for the detailed answer. The alternate approach suggested by you will use events in all 4 LWCs instead of NavigationMixin.Navigate . The aura component will be needed regardless. But is there any performance advantage in using events instead of NavigationMixin.Navigate ?
|
|
Nov 15, 2020 at 15:16 | history | edited | arut | CC BY-SA 4.0 |
added content
|
Nov 15, 2020 at 15:05 | history | edited | arut | CC BY-SA 4.0 |
fixed grammer
|
Nov 15, 2020 at 15:00 | history | answered | arut | CC BY-SA 4.0 |