data-store contracts
Purpose
Section titled “Purpose”data-store attributes identify canonical store elements for apps that do not use Nube SDK — stable DOM selectors across theme patch versions.
Examples
Section titled “Examples”<h1 data-store="product-name-{{ product.id }}">…</h1><div data-store="product-price-{{ product.id }}">…</div><input type="submit" data-store="product-buy-button" … /><div data-store="cart-item-{{ item.product.id }}">…</div>Editor blocks
Section titled “Editor blocks”<div {{ block | block_attributes }} data-store="heading-block-{{ block.id }}">- Do not remove existing
data-storeattributes. - When wrapping a node, keep the attribute on the original element.
- New hooks: lower-kebab-case + entity id when applicable.
data-component(when present) follows the same rules.
js-* classes
Section titled “js-* classes”Contract with theme/static/js/store.js — renaming breaks behavior without a visible error. Treat js-* with the same care as data-store.