i am trying to add space to the filtered names the filter return but i got all the names without space.
how can i fix the filtered array i getting to be with space from name to name?
how it look like currently -

i want the filtered array will return the names from the array with space or downline from name to name.
here is my code :
import logo from './logo.svg';
import './App.css';
import React from "react";
class App extends React.Component {
state = {
array : ["saar","shoval","moshe","ori","liam"],
text:""
};
textInput = (event) =>{
const inputText=event.target.value;
this.setState({
text:inputText
})
}
addName = () => {
const name =this.state.array;
name.push(this.state.text);
this.setState({
array:name,
text: ""
})
}
render(){
return(
<div>
<div><h2><u>long names</u></h2>
{this.state.array.filter((item) => {
return(
item.length >= 4
) } )}
</div>
<div><h2><u>short names</u></h2>
{this.state.array.filter((item) => {
return(
item.length < 4
) } )}
</div>
<input value={this.state.text} onChange={this.textInput} />
{this.state.text.length > 0 ?
<button onClick={this.addName}>Add</button>
:
<div> </div>
}
</div>
)
}
}
export default App;