i expect the hook to be updated(and i want every time to keep only one object i dont want to save previous value) my hooks:
const [rooms, setrooms] = useState([