mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-24 20:27:51 +00:00
client/web: pipe through to React in dev mode
Updates tailscale/corp#13775 Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
This commit is contained in:

committed by
Sonia Appasamy

parent
98ec8924c2
commit
3f12b9c8b2
5
client/web/src/components/app.tsx
Normal file
5
client/web/src/components/app.tsx
Normal file
@@ -0,0 +1,5 @@
|
||||
import React from "react"
|
||||
|
||||
export default function App() {
|
||||
return <div>Hello world</div>
|
||||
}
|
16
client/web/src/index.tsx
Normal file
16
client/web/src/index.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import React from "react"
|
||||
import { createRoot } from "react-dom/client"
|
||||
import App from "./components/app"
|
||||
|
||||
const rootEl = document.createElement("div")
|
||||
rootEl.id = "app-root"
|
||||
rootEl.classList.add("relative", "z-0")
|
||||
document.body.append(rootEl)
|
||||
|
||||
const root = createRoot(rootEl)
|
||||
|
||||
root.render(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
</React.StrictMode>
|
||||
)
|
Reference in New Issue
Block a user