最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

reactjs - browser output blank - react project with vite - Stack Overflow

programmeradmin3浏览0评论

live server vite issue

live server - not

not output

not able - output

vite, react, ? ok- yet . no output. no code out. put. blank.

Header.jsx

index.css

index.html

package.json

logo.png

vite.config.js


<body>
    <div id="root"></div>
    <script src="/index.jsx" type="module"></script>
</body>

import { createRoot } from "react-dom/client"
import Header from "./Header"
const root = createRoot(document.getElementById("root"))


function MainContent() {
    return (
        <main>
            <h1>bhbjbhbhj</h1>
         
        </main>
    )
}

function Footer() {
    return (
        <footer>
            <small>© 2024 Ziroll development. All rights reserved.</small>
        </footer>
    )
}

function Page() {
    return (
        <>
            <Header />
            <MainContent />
            <Footer />
        </>
    )
}

root.render(
    <Page />
)
发布评论

评论列表(0)

  1. 暂无评论