Polaris React - migration to web components

Hi! I’m part of a team working on a Shopify Admin App. We currently use Polaris React to build our UI. Right now, we’re looking into whether we should migrate to Polaris Web Components.

How likely is it that Polaris Web Components will eventually become not just the recommended way, but the required one for Admin Apps? We can’t migrate right away — it’s a big change that needs long-term planning. Our team’s a bit worried that at some point Shopify might make Web Components mandatory for apps to keep running. Could that actually happen?

I don’t know the answer to your question about whether the web components will be “required” – seems unlikely as even using Polaris React isn’t really required – but they have said elsewhere the Polaris React components will not be updated. So I would expect them eventually to not be compatible with supported versions of React.

At the moment, I would caution against migration at this time. The web components are still missing features that are needed to create some of the UI elements you might need for app functionality – e.g. the table doesn’t have great options (i.e. consistent with other Shopify pages) for row selection/actions, sorting control, or “totals”-- and bugs seem to be frequent. Shopify still uses some version of Polaris React (albeit it seems to have more features and be a bit nicer – kinda annoying they don’t share it with the rest of us) for their own pages. My hope is once (if) they start using the web components for production internally they’ll see that they’re not quite ready and add the features needed to build more complete apps – and hopefully better end to end tests to find bugs before pushing updates. For now, it’s pretty clear they are not dog fooding the web components.

It’s already not being updated so I don’t think its that far away, but I also don’t think they are going to completely turn away the large react app ecosystem any time soon.

I would start moving components over peice by peice so you can identify issues and come up with a long term migration plan. Some components are easy and able to be swapped in place and some are either different or not full 1:1 versions of the react equivalent and need some creative solutions to implement the same way.