initial commit

This commit is contained in:
grinikita
2024-11-09 19:15:21 +03:00
commit f7f93144e5
10 changed files with 10248 additions and 0 deletions

15
src/app.tsx Normal file
View File

@@ -0,0 +1,15 @@
import React from 'react';
const App = () => {
return (
<h1>
Hello world для проекта - kfu-24-teacher asd as das das d as{' '}
<div>
{' '}
asda s <span>123</span>
</div>
</h1>
);
};
export default App;

23
src/index.tsx Normal file
View File

@@ -0,0 +1,23 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './app';
export default () => <App />;
let rootElement: ReactDOM.Root;
export const mount = (Сomponent, element = document.getElementById('app')) => {
const rootElement = ReactDOM.createRoot(element);
rootElement.render(<Сomponent />);
if (module.hot) {
module.hot.accept('./app', () => {
rootElement.render(<Сomponent />);
});
}
};
export const unmount = () => {
rootElement.unmount();
};