refactoring courseschedule storage
This commit is contained in:
10
src/views/lib/react/index.tsx
Normal file
10
src/views/lib/react/index.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
|
||||
export default function render(element: React.ReactElement, container: HTMLElement | ShadowRoot | null) {
|
||||
if (!container) {
|
||||
throw new Error('Container is null');
|
||||
}
|
||||
const root = ReactDOM.createRoot(container);
|
||||
root.render(element);
|
||||
}
|
||||
Reference in New Issue
Block a user