What is the difference between constructor and useState, I tried them both and they work on same solution.
UseState
const [filterName, setFilterName] = useState("");
const [robots, setRobots] = useState([]);
vs
constructor
constructor() {
super()
this.state = {
robots: robots,
searchfield: ""
}
}