Closed samdenty closed 3 years ago
It seems the component is updating when new data comes in -- but when it updates, the data is stale.
https://github.com/gqless/gqless/blob/c67e32800593fe9fbc42e1bc28682692a3df0501/packages/react/src/subscription/useSubscription.ts#L63
I believe I previously used setTimeout here https://github.com/gqless/gqless/blob/c67e32800593fe9fbc42e1bc28682692a3df0501/packages/react/src/common.ts#L60 as I ran into a load of race conditions like this.
setTimeout
It seems the component is updating when new data comes in -- but when it updates, the data is stale.
https://github.com/gqless/gqless/blob/c67e32800593fe9fbc42e1bc28682692a3df0501/packages/react/src/subscription/useSubscription.ts#L63
I believe I previously used
setTimeout
here https://github.com/gqless/gqless/blob/c67e32800593fe9fbc42e1bc28682692a3df0501/packages/react/src/common.ts#L60 as I ran into a load of race conditions like this.