- Ruby on Rails 5.1
- React JS
- Polaris: https://github.com/Shopify/polaris
Made it to all connect together somehow using the following approach:
- webpacker gem
- Will work only if webpack is run in non-server mode using
./bin/webpack --watch
- because otherwise UI is on separate port and Shopify cannot communicate with one or another normally. - Shopify key and originDomain are taken from JS object.
If you have found a better solution for it all to work together, please, contribute here!
-
Setup Shopify App by this manual: https://github.com/Shopify/shopify_app
-
Add webpacker gems to Gemfile
gem 'webpacker', '~> 2.0'
gem 'webpacker-react', "~> 0.3.1"
- Add Polaris React component: https://github.com/Shopify/polaris