forked from munozcotelo-mytraining/deprecated-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.tsx
32 lines (25 loc) · 949 Bytes
/
index.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**
* Import libraries:
* - React -> JSX
* - ReactDom -> DOM methods
*/
import * as debug from "debug";
import * as React from "react";
import * as ReactDOM from "react-dom";
import { BrowserRouter as Router } from "react-router-dom";
//import { HashRouter as Router } from "react-router-dom";
/* Comment/Uncomment to use class or functional component */
import { AppComponent } from "./logic/components/AppComponent.class";
import { AppComponent as AppComponentFunction } from "./logic/components/AppComponent";
const mainDebugger: debug.Debugger = debug.debug("react").extend("main");
mainDebugger("Start app");
/**
* Buscamos el elemento con id="root" de la pagina html
* y ahi inyectamos
*/
ReactDOM.render(
<Router><AppComponentFunction compiler="online" framework="REACT" /></Router>,
//<Router><AppComponent compiler="online" framework="REACT" /></Router>,
document.getElementById("root")
);
mainDebugger("App rendered");