- Added memoization to ChatHistoryPanel, ChatMessageList, and TaskBoard components to prevent unnecessary re-renders. - Refactored HomePage to utilize useMemo for derived state calculations, enhancing performance. - Updated main.tsx to conditionally render React.StrictMode based on the environment. - Improved chat and channel store hooks to allow for selector functions, enhancing flexibility in state selection. - Enhanced streaming message handling in chat store to manage pending deltas more effectively. - Refactored LoginPage to include animated decorations for improved user experience. - Implemented lazy loading for routes in the router to optimize initial load time.
23 lines
435 B
TypeScript
23 lines
435 B
TypeScript
import React from 'react';
|
|
import ReactDOM from 'react-dom/client';
|
|
import App from './App';
|
|
import './styles.css';
|
|
|
|
const container = document.getElementById('app');
|
|
|
|
if (!container) {
|
|
throw new Error('Missing #app container for React entry.');
|
|
}
|
|
|
|
const app = <App />;
|
|
|
|
ReactDOM.createRoot(container).render(
|
|
import.meta.env.DEV
|
|
? app
|
|
: (
|
|
<React.StrictMode>
|
|
{app}
|
|
</React.StrictMode>
|
|
),
|
|
);
|