React-query: still fetches when { manual: true }

Created on 24 Jun 2020  路  6Comments  路  Source: tannerlinsley/react-query

Describe the bug
setting { manual: true } doesnt prevent fetching

To Reproduce
Steps to reproduce the behavior:
https://codesandbox.io/s/react-query-manual-bug-7m6j9

switch between versions of react-query
v1 doesnt fetch posts
v2 fetches posts

Expected behavior
same behavior

All 6 comments

@wolverineks did you figure it out? Working on 1 -> 2 upgrade right now and encountered the same issue. Couldn't find any mention on that in release notes

Option was changed to { enabled: boolean }

can I have { enabled: false } and still call refetch ? or it will get suppressed?

refetch will bypass enabled and always refetch

@tannerlinsley small suggestion - if you can still edit release note for 2.0, might be good to mention manual prop explicitly. What I've tried first was to cmd + f for this string. Also it wasn't obvious to me that enabled replaces manual

Let me know your suggested changes and I鈥檒l make it happen.

Was this page helpful?
0 / 5 - 0 ratings