Works with the AI Agents you already use

    Polaris React to Web Components Migration

    by Nahid hossain

    1

    Move a Shopify app off Polaris React to Polaris web components slice by slice, with an inventory script, docs-checked mappings, app-shell swaps and proof nothing broke.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Polaris React to Web Components Migration

    Polaris React to Web Components Migration

    Example session with this skill installed

    Run an inventory of my Shopify app's Polaris React usage and then migrate the Settings page (src/pages/Settings.tsx) to Polaris web components.

    • Read your context and instructions
    • Compiled the polaris react to

    I have completed the inventory and migrated the Settings page. The inventory found 12 files importing Polaris React. After this slice the count is 11. Behavior is unchanged: the same two fields, the same save and discard actions.

    Migration Report: Settings

    Polaris ReactReplacementStatus
    Page<s-page>Converted
    Card<s-section>Converted
    TextField<s-text-field>Converted
    Select<s-select> + <s-option>Converted, wired to state
    ContextualSaveBar<form data-save-bar>Replaced. The bar supplies Save and Discard
    Toastshopify.toast.showSwapped to App Bridge
    FrameremovedNo wrapper replacement
    import { useState } from "react";
    
    const initial = { name: "Store Owner", language: "en" };
    
    export function Settings() {
      const [name, setName] = useState(initial.name);
      const [language, setLanguage] = useState(initial.language);
    
      async function handleSubmit(event: React.FormEvent<HTMLFormElement>) {
        event.preventDefault();
        await saveSettings({ name, language });
        shopify.toast.show("Settings saved");
      }
    
      function handleReset() {
        setName(initial.name);
        setLanguage(initial.language);
      }
    
      return (
        <s-page heading="Settings">
          <form data-save-bar onSubmit={handleSubmit} onReset={handleReset}>
            <s-section>
              <s-text-field
                label="Name"
                value={name}
                onInput={(e: React.FormEvent<HTMLInputElement>) => setName(e.currentTarget.value)}
              />
              <s-select
                label="Language"
                value={language}
                onChange={(e: React.FormEvent<HTMLSelectElement>) => setLanguage(e.currentTarget.value)}
              >
                <s-option value="en">English</s-option>
                <s-option value="fr">French</s-option>
              </s-select>
            </s-section>
          </form>
        </s-page>
      );
    }
    

    Connects securely to your tools. The creator never sees your data.

    About this skill

    The problem

    Polaris React is being replaced by Polaris web components. Converting a whole app at once is risky, and it is easy to break the app shell (Frame, Toast, save bar) without noticing.

    What it does

    • Counts every Polaris React component in your app with a script you can re-run to show progress
    • Converts one page or feature at a time, checking each component against Shopify's migration guide
    • Replaces Frame, Toast, Loading, ContextualSaveBar and Navigation
    • Warns about styling that stops working inside web components
    • Verifies each slice and removes the old package only when nothing imports it

    Why not just prompt your agent?

    Agents guess tag names and properties. This skill makes the agent read the official guide for each component, one slice at a time, and report the numbers before and after.

    Works with

    Embedded Shopify apps built with React. The included inventory script needs Node 18 or newer.

    Test prompts

    • Migrate the settings page to Polaris web components.
    • How much of our app is still on Polaris React?
    • Replace our Toast and ContextualSaveBar usage.
    • Remove @shopify/polaris from the project.

    Safety

    The script is read-only and offline. The agent asks before installing or removing packages.

    Where it stops

    It does not cover Shopify-hosted UI extensions, and it cannot test inside the Shopify admin for you.

    Some components have no direct replacement, so the agent picks one and explains it. The inventory script counts imports from @shopify/polaris in script and style files; components used through your own wrapper files count only where the wrapper imports them. It cannot test inside the Shopify admin, so you check each slice in a development store. Mappings depend on Shopify's current migration guides, which the agent reads. Needs Node 18+. Review all changes. Not affiliated with or endorsed by Shopify.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Frequently Asked Questions

    This skill manages the transition from Polaris React to the new web component standard. It automates the identification of deprecated components and maps them to their modern equivalents while ensuring critical Shopify App Bridge features like toasts and the save bar continue to function.

    You need a Shopify embedded app codebase and a Shopify development store to verify the migration. The skill uses the provided inventory script and documentation-checked mappings to ensure every component adheres to Shopify's official migration guides.

    This skill works with React and TypeScript projects using the Shopify App Bridge. It is designed specifically for embedded apps running in an iframe within the Shopify admin and does not support Shopify-hosted UI extensions like checkout or admin home extensions.

    The skill performs a systematic migration that includes an inventory report of remaining React components, updated frontend files, and a verification checklist. It ensures that event handlers and Shadow DOM styling constraints are addressed before providing a final progress report.

    You can ask your agent to run an inventory of your Polaris React usage to establish a baseline. From there, you can direct it to migrate a specific feature or route, such as your settings page or data tables, to the new Polaris web component standard.

    No. You open the converted page in your own development store to check it.

    New in E-commerce

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for E-commerce.