title: how to store textarea new line value into array with react and send it to node js variable with post request
body: <p>how to store textarea new line value into array with react and send it to node js variable with post request</p>
  <p><code> const [inputvalue, setInputvalue] = useState(&quot;&quot;);</code></p>
  <pre><code>const  handleSubmit = (e) =&gt; {
    e.preventDefault();
    try {
      axios.post('/inputData', inputvalue , {
        headers: { 'Content-Type': 'text/plain' }
      })
        .then((response) =&gt; {
          setData(response.data);
        });
    } catch (e) {
      console.log('Error!', e);
    }
    }
  </code></pre>
  <pre><code>&lt;form onSubmit={handleSubmit}&gt;
        
          &lt;TextField id=&quot;outlined-multiline-static&quot; label=&quot;Multiline&quot; multiline rows={4} onChange={(e) =&gt; setInputvalue(e.target.value)} value={inputvalue} placeholder=&quot;Enter your keyword&quot; /&gt;
        
        &lt;button type=&quot;submit&quot; className=&quot;btn btn-primary mt-3&quot; onClick={() =&gt; setLoading(true)}&gt;Click here&lt;/button&gt;
      &lt;/form&gt;
  </code></pre>