gale/app.tsx

21 lines
433 B
TypeScript

import React from "react";
function App(){
const [countGet, countSet] = React.useState(2);
return <>
<p style={{padding:"2rem", background:"black", color:"white"}}>test paragraph</p>
<button onClick={()=>{countSet(countGet+1)}}>{countGet}</button>
</>
}
const Other =()=>
{
return <p>other app component</p>
}
export default function Root()
{
return <div><h1>rooted</h1><App/><Other/></div>
}