Lightning Web Components vs Aura Components, what should I learn?
If you are someone whose been working on Salesforce Classic for some time and wanted to make the switch, the very first question that crops up is, what should I learn, Lightning Web Components or Aura Components?
This is one of the biggest confusion in the Salesforce Community these days.
Everyone has their own take and I think it entirely depends on you. A few of them suggest that you need to start off with Aura first and then jump on to LWC, likewise, there is an equally same on of folks who say it's better that you should jump directly on to LWC.
My personal take is to learn Aura first and then jump on to LWC
Here is my reasoning!
Aura Components were released around 2013/2014 and a significant no. of companies have already adopted Aura Components. They might not be looking at moving the entire Aura Components codebase again to Lightning Web Components just because Salesforce released a new framework.
If you were to work on a project that uses Aura Components and if it's an enhancement project then you need to be good with Aura Components.
Having said that, they might plan their future releases on LWC going ahead.
Not only that, if you have a firm understanding of Apex and Aura components you can easily ramp up your skillset in Lightning Web Components.
The concepts remain the same only thing that changes is Syntax.
Let me explain this a bit. There is a concept called Lightning Data Service in Aura Components and we have the same concept in LWC as well.
The purpose and characteristics of LDS tags are exactly the same. But in Aura Components the tag will be <lightning:recordForm /> whereas in LWC it's going to be <lighnting-record-form></lighnting-record-form>.
Almost all the attributes that we send for LDS tags in Aura Components are also similar to that of the attributes that we send in LWC Components.
Not only LDS, we have Events, Lightning Message Service, Navigation services in Aura Framework which are also available in LWC, they also work similarly in both the frameworks and the only difference is their Syntax.
So typically if you are good with Aura Components you can easily ramp up your LDS skillset in LWC in a week.
However, there are a set of folks who strongly believe that you should start off with LWC directly. There is no one way of doing it. It completely depends on your comfort and thought process.
If you directly jump on to LWC it might take you a month to master the framework considering the effort that you put in. But it's absolutely fine to take that route too.