Dynamic Attribute and Style Binding with Interactivity API Directives (6) Best Practices Use data-wp-class with predefined CSS classes instead of data-wp-style Why? CSS classes are more performant, easier to maintain, and enable browser caching. 👇🏽 wp-block-editor.com/dynamic-attr...
Dynamic Attribute and Style Binding with Interactivity API Directives – WordPress Editor and Blocks
The WordPress Interactivity API provides powerful binding directives that connect your state to DOM attributes, styles, classes, and content. These declarative
wp-block-editor.com