Asynchronous rendering of Shopify Liquid Snippet in theme app extensions
You are correct. You cannot assign anything JS to Liquid, as Liquid is all compiled and rendered by Shopify before any JS even loads. Typically you can provide you JS with data by rendering the data you need inside JS. Try that. Usually works. No need for an extra callback from JS back to Shopify using a Proxy.
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.