跳轉到主要內容
React template preview

建立專案

npx extension@latest create my-extension --template=react

你會獲得什麼

以元件為核心的 UI 起點,完整相容 Manifest V3(MV3)。Popup、options 與 content script 以 React 進入點出貨,並已串接好 hot module replacement(HMR)。修改元件後就能直接看到更新,不需手動重新載入擴充功能。 對已熟悉 React 的團隊來說,這是最常見的起點。

原始碼

在 GitHub 瀏覽完整原始碼:extension-js/examples/react