Takeaways from Building Shopify Apps
I had a client who needed to generate 1,000 different codes. The reason behind this was that if there's only one code, it's prone to abuse as people may share it with others. Hence, each code should be intended for one person only.
Thanks to Laracasts! they have an available series for building Shopify Apps using Laravel and React.
https://laracasts.com/series/build-shopify-apps-with-laravel/
Setting up a Shopify Development Store involves the basic steps needed to establish the development environment:
Shopify Partners - https://partners.shopify.com/
Laravel Shopify App - https://github.com/Kyon147/laravel-shopify/
Ngrok or Expose - There must be an accessible URL to embed in their Shopify Partners. I opted to use Expose. Note that it expires in at least an hour or two, which requires me to regenerate a new URL periodically. It's a bit of a hassle, but it gets the job done.
Managing to use the React framework, here are some takeaways:
- I appreciate using from Vue, which allows returning DOM elements inside return ().
- React
useState()
isref()
in vue - Shopify Polaris for the win! As a beginner, it made me enjoy my development experience with React.
- Shopify API Documentation can be overwhelming. It took me some time to find the correct API to use.
- I learned to use jobs to handle API rate limitations.
Overall, it was a great learning experience. Here's a screenshot of the app I made: