mirror of
https://github.com/yaklang/yaklang-chrome-extension.git
synced 2026-09-26 05:01:53 +08:00
13 lines
347 B
TypeScript
13 lines
347 B
TypeScript
import React from 'react';
|
|
import { createRoot } from 'react-dom/client';
|
|
import App from './App';
|
|
|
|
// 获取根元素
|
|
const container = document.getElementById('root');
|
|
if (!container) throw new Error('Failed to find the root element');
|
|
|
|
// 创建根
|
|
const root = createRoot(container);
|
|
|
|
// 渲染应用,移除 StrictMode
|
|
root.render(<App />);
|