how to use usestate with node.js backend and react frontend

i use node.js in my HTML file using tag now how do i use useState with it
I tried:

const {useState} = React

Here is my code

const {useState} = React;
function App(){
const {text, setText} = useState("Hello world")
console.log(text);
function handleClick(){
  setText("Hello universe")
}

return <h1 onClick={handleClick}> {text} </h1>
}

ReactDOM.render(<App />, document.getElementById('root'))