How can ı use trim for input in the ReactJS?

While setting the status, the space key is never pressed while typing ‘e.target.value.trim ()’. But I want to press the space bar like in Vanillia javascript, but I want the spaces to be removed when retrieving text from input. How can I make the clipping function work like in javascript?

React is JavaScript. The trim method works exactly the same because it is the exact same method.

It’s not really clear what you want to do. Do you have a code sample?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.