I'm in the process of porting an M1 module over to M2 and am trying to figure out the cleanest approach for conditionally mutating a component based on a system configuration value.
In Magento 1 I did the following:
The best way I can think of to do this is...
- Add some dummy element to the document with a
dataproperty for the configuration value.
- Mutate the widget and use jQuery to access the value from the document.
Feels pretty dirty and I'm wondering if there's a cleaner way?