Considerations Before Using LWS-Only Features
Before you go all-in on adopting Lightning Web Security (LWS), remember that when it’s enabled, all custom Lightning components in the org are affected. All your custom components run in the new architecture.
Lightning Web Security can’t be disabled on individual components, and isn’t associated with an API version.
Suppose you refactor one component to take advantage of an LWS-only feature, described in How Lightning Web Security Compares to Lightning Locker, such as importing a module from another namespace. That change isn’t compatible with Lightning Locker, so the component now relies on Lightning Web Security.
If you later discover that another component has issues running with LWS, you can’t solve the problem by going back to Lightning Locker because the refactored component uses features that require LWS.
Before enabling LWS in a production org, ensure that all your Lightning components work with LWS. See Workflow to Test Your Components with Lightning Web Security.
See Also