title: Get textarea character count using reactjs with help of usestate hook
body: <p>I am new to reactjs i have tried to get textarea character count, It's need to display while user typing in textarea but not able to get count also throw state object is readonly error. My code is</p>
  
  <pre><code>import React from "react";
  
  export default function FullWidthTabs() {
    const [textAreaCount = 0, textAreaTotal = 250] = React.useState(0);
  
    const recalculate = e =&gt; {
      console.log("event value:", e);
      textAreaCount = e.target.value.length;
    };
    return (
      &lt;textarea
        type="text"
        rows={5}
        className="full_height_Width"
        onChange={recalculate}
      /&gt;
    );
  }
  </code></pre>
  
  <p>Here expected output need to update character count like 
  <a href="https://i.stack.imgur.com/4GrMy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4GrMy.png" alt="example "></a></p>