How to use this.state.rent value instead of this.props.house.rent value in cache.readQuery or cache.writeQuery
问题 The old value comes back into the input field. I had initialized this.props.house.rent (which is the old value coming back) with input field value this.state.rent (user entered value) but I cannot do it as it becomes antipattern syntax, you can see it in below comments of code. cacheUpdate = (cache, { data: { updateHouse } }) => { const data = cache.readQuery({ query: QUERY_CONFIRM_QUERY, variables: { id: this.props.confirmId }, }); const houses = data.queryConfirm.houses; const prevHouse =