This commit is contained in:
go0p
2025-03-04 16:07:14 +08:00
parent 6f82842c92
commit 06c053228c
11 changed files with 126 additions and 130 deletions
+17
View File
@@ -0,0 +1,17 @@
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);
// 渲染应用
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);