gqless-hook icon indicating copy to clipboard operation
gqless-hook copied to clipboard

Much slower

Open natew opened this issue 5 years ago • 2 comments

I tried converting a few things in our app to useQuery, but when I do I see a ton more renders/updates. Is it perhaps breaking the resolution algorithm that concats everything into a single query? If so, is that avoidable?

natew avatar May 11 '20 20:05 natew

Welcome here. The very first issue.

Could you explain a bit more about your conversion? Is it from the original gqless hoc to this gqless-hook? Sorry I didn't clearly state in the README, but this lib expects users to extensively use React.memo for function components and React.PureComponent for class components. It would always be better to split into multiple useQuery if that makes sense.

dai-shi avatar May 11 '20 23:05 dai-shi

Ok I’ll need to check what happened because it went from being fairly fast to taking multiple seconds and logging many more times.

natew avatar May 12 '20 00:05 natew