Suppose we need to develop an app which can be used both inside Salesforce and in another web site. And definitely we don’t want to duplicate the code.
So basically there are two options here:
Develop the components in lightning component (aura or lwc) , then expose them to external website using lightning out.
Develop those components in either React or Angular, then embed them into Salesforce using Canvas App.
Personally I feel both approaches are viable. But when it comes to architect decision, is there one approach which is better? What are the pros and cons? Let’s suppose we have the capacity in doing both.