I have a react app which calls external api’s and displays data to the user. It is currently installed on the merchants store and I thought there would be a setting or configuration in shopify admin to allow direct access to the app from the store but that’s not the case. I have created a theme extension which calls a proxy to get data but if I continue down this route I will have to rewrite the app in js and liquid or as you have shown on here I could bundle it and reference it on my extension in an app block. I would just like some pointers to folders and files that should be in them and ways to build?
Topic summary
Developers are exploring how to use React within Shopify theme app extensions, which traditionally rely on Liquid templates and vanilla JavaScript. The core challenge is that app blocks don’t natively support React frameworks.
Established Solution:
- Bundle React apps into a single JavaScript file using tools like Webpack or Vite
- Reference the bundled file (e.g.,
bundle.js) in the app-block’s Liquid schema under thejavascriptproperty - Create React source code in a separate folder outside the extension directory
- Configure the build tool to output the compiled bundle into the extension’s
/assetsfolder
Common Implementation Issues:
- React requires a DOM element to mount to, which must be defined in the
.liquidfile - Asset management (images, CSS) becomes complicated when transitioning from Liquid to React
- Developers struggle with proper folder structure and build configuration
- Size limits and Shopify’s restrictions on extension folder contents create constraints
Resources & Alternatives:
- A community member shared a template repository demonstrating React + Tailwind CSS setup
- Settings can be passed from Liquid schema to React via data attributes on the root div
- At least one developer abandoned this approach entirely, opting to embed their React app as an externally-hosted iframe
Status: The discussion remains open with ongoing questions about asset handling and build configuration. Multiple participants note that Shopify’s documentation lacks comprehensive guidance on React integration.