Having played a little with lightning web component during pilot, I think yes sooner or later everyone will be using lightning web components to build their apps. To begin with currently what i know is it lacks support for communities or flows and many other areas (Official docs are yet to be released so we will come more when docs go out on 17th Dec). However eventually (may be an year from now ) I think Salesforce will make every attempt to add the support lwc everywhere with time.
Why I think LWC is future?
Excellent ES6 and beyond Javascript support.
Faster rendering performance.
Consistent with the webcomponent framework specifications from w3 (https://www.w3.org/standards/techs/components#w3c_all)
Excellent tooling support .(Salesforce built great tooling utility - https://marketplace.visualstudio.com/items?itemName=salesforce.salesforcedx-vscode-lwc)
The syntax and semantics looks to be very clear and adheres to the current webcomponents standards.
Current State Of Aura
- Still supported by salesforce and going to be supported
- Salesforce looks to have great documentation (available in spring 19 orgs) on how to use aura with lightning web components as well how to migrate your existing aura components to lightning web components.
I am sure salesforce will support aura for long time as it will take few more years for them to replace everything under the hood(Safe harbor and note that I don't work for salesforce so do not buy in just based on what write or speak).
I think you should support your aura components and keep enhancing
them however start the learning path by playing with docs. Since the
product will be GA in new year, if you have a new component coming up
surely look to build using the LWC.
For existing components take opportunity to ask few questions
- Should I redesign with better UX as a part of lwc migration?
- What were some of the bottlenecks you encountered when building with aura . Does the new framework fill them?
- What your end users want from the components you have. Your release backlog. If you think LWC will fulfill some of these requirements at a greater velocity then I would say just go for it knowing its going to GA so you know you will have access to support on this.
If you have access to the spring19 pre release org you can explore the documents on the "lightning web components security via locker service" in developer guide. The docs are available for lockerservice @ (YourDomain.lightning.force.com/docs/component-library/documentation/lwc/lwc.security_locker_service)
Lets highlight some key points from document
DOM Access Containment
You cannot use document.querySelector() and the syntax to access the shadow DOM will be this.template.querySelector()
Secure Wrappers
Still you will need SecureWindow, SecureDocument , SecureObject (All these were available in aura locker). On top of it you also have new secure elements SecureLightningElement and SecureTemplate.
SecureLightningElement is a base class that every lightning web component extends from .
SecureTemplate is the shadowRoot node .The docs list which APIS are not supported .
Restrict access to Global Variables
Global variables like $Aura,$A, sfdc and sforce are all restricted .
CSP Support
All Javascript libraries needs to be referenced from static resource and all external images , fonts and CSS needs to use HTTPS .
Except for IE11 ,the locker security principles are applied to the lightning web components as well .
Best Answer
Looks like official support for this is coming out soon, it was flagged for Summer 20 but I don't see support for it yet. https://help.salesforce.com/articleView?id=lex_roadmap.htm&type=5
In the mean time you can manually generate the URL needed to have LEX open the page in a subtab. Here is code for opening the new page for a custom object and passing in default field values.