const Button = () =>{
return (
<button>My Button</button>
)
}
export default Button
import React from 'react'
import './App.css'
import Button from "./components/button"
import Image from './components/image'
import { useState } from "react"
const [count, setCount] = useState(0)
const handlerClick = () => {
setCount(count + 1)
}
const App = () =>{
return (
<>
<Button count ={count} onClick ={handlerClick}/>
</>
)
}
export default App
import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App.jsx'
import './index.css'
ReactDOM.createRoot(document.getElementById('root')).render(
<React.StrictMode>
<App />
</React.StrictMode>,
)
i starting to learn react and i try to made button with useState for adding number( i followed the react documentation, but i have create the button with components, import it into the app file, and import the app file into main.jsx for the root. Why my web page is still blank?