Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

How can i use React or JQuery for theme extension development?

Solved

How can i use React or JQuery for theme extension development?

ahmetalan
Shopify Partner
4 0 0

Hi,

I'm developing theme extension for my app, i can use react on admin side  but on I'm consufed about How can i use React or JQuery for theme extension development? 

 

 

Accepted Solution (1)

Liam
Community Manager
3108 344 904

This is an accepted solution.

Hi Ahmetalan,

 

It's not possible to include external JS libraries or frameworks in theme app extensions - this is an intentional limitation to ensure that merchants' storefronts remain as performant as possible. You can include your own JS within the /assets folder, I'd recommend manually adding whatever JS you need to a file within the app project.

 

Hope this helps,

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 3 (3)

Liam
Community Manager
3108 344 904

This is an accepted solution.

Hi Ahmetalan,

 

It's not possible to include external JS libraries or frameworks in theme app extensions - this is an intentional limitation to ensure that merchants' storefronts remain as performant as possible. You can include your own JS within the /assets folder, I'd recommend manually adding whatever JS you need to a file within the app project.

 

Hope this helps,

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

bilal87
Shopify Partner
7 0 0

Your answer makes sense but still I need to load jquery and Jquery UI in my theme app extension and I am stuck in loading it. I know external libraries are not recommended but this is a special use case, is there anything which can be done?

Liam
Community Manager
3108 344 904

I have looked into attempting this myself before, but I couldn't find a way to connect with an external library.

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog