Using LWS-Only Features
Before you go all-in on adopting Lightning Web Security, 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.
Ensure that all your Lightning components are ready to run in LWS before enabling it in a production org.
- Developer's Blog: Learn MOAR in Spring ’22 with Lightning Web Security
- Trailhead: Lightning Web Security Basics