March 28, 2017
- Chris Sauvé
- Mathew Allen
- Utkarsh Saxena
We use React as the foundation of our new UI architecture. This improves developer efficiency, performance, and helps us build for the long-term. We understand that the lifecycle for JavaScript frameworks are short. The benefits outweigh the risk associated with coupling our architecture to React.
The UI architecture at Shopify is ready for modernization. We decided it was time to address the the foundational problems associated with the Admin Next architecture:
- Load performance is not great
- Interaction performance is not great
- The technical stack is complicated and requires multiple languages
- Our conventions do not promote clean, reusable, and testable code
- The overall developer experience could be improved
We decided we needed it was important for us to make a change. In doing so, we wanted to ensure we:
- Increase developer efficiency
- Improve end-user performance
- Provide more opinionated conventions to promote consistency
- Can easily leverage Shopify's success with GraphQL
- Are able to attract and retain top talent
We evaluated four main options:
- React
- Vue
- Webcomponents (particularly with Polymer)
- Improvements to Twine and Turbograft
We feel that React and Vue are both excellent choices for complex web UI projects today. They both offer excellent performance, developer experience, and conventions. React has stronger GraphQL tooling, a larger community, a larger hiring pool, and a larger team maintaining it. These factors solidified that React is the right solution for Shopify.
Many documents were prepared as part of this decision. Some of the most important ones are:
- Exploration scorecard
- React exploration
- Vue exploration
- Webcomponents and Polymer exploration
- Twine and Turbograft exploration
Moving to React brings with it more moving parts. This increases the complexity of the application over its Rails-based counterpart. We believe that the benefits to developer experience, hiring pool, and performance outweigh this.
We also acknowledge that, in general, the JavaScript landscape is evolving at a rapid pace. We accept the risk that something better suited than React emerges in the next few years. However, we believe that the React ecosystem is well poised for longevity. It is backed by a large company that is committed to moving the project forward and there is a vibrant community actively building tooling.