```
import React, { useState } from "react";
export default function DropDown() {

const fun=()=>{
document.getElementById('id').innerHTML='Hello world'
}
  return (
    <>
    <button onClick={fun()}>click</button>
      <p id="id"></p>
    </>
  );
}

```

how to resolve the error in react? not in JavaScript. If we are not use inner HTML instead of that what to use in that field?