-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After refetch is done, component is not re-rendered #82
Comments
@FredyC I'm not sure if it will be very helpful, but I was able to create a working version (without using mobx): https://codesandbox.io/s/9ym945qn2w |
Yea, well, nothing surprising there since everything is re-rendering then obviously the This is kinda what the article is supposed to be about, to be able to re-render affected component only. Oh well, I will try to dig deeper. |
It should also work. Please look at: #83 (comment) |
@trojanowski That's not what I want. The local state will obviously work, but imagine it needs to go through like 10 or more layers to a completely different part of the app. Prop drilling is an ugly beast ⚔️ You can have a look at the article (it will be officially published on Monday) to see what I mean. |
Nonetheless, it feels like an upstream bug. After a bit of debugging it seems that ObservableQuery subscribe is not randomly invoked and |
I dont know if this is related, but I put a solution right now at #74 |
I am using ^0.4.5, and did not experience the problem though my code is almost the same with that of @FredyC. Only one difference is that I use refetch function without variables or other parameters. just const RefetchButton = ({refetch}) =>
<Button onClick={refetch} />; Clicking this button triggers data fetching of btw, it seems something wrong with fetching data in the sandbox example. after try, I found calling refetch function with variable parameter does not trigger updating the original query. |
I'm experiencing this with Does anybody know whether this was already fixed or can point me out to a discussion/solution? Thanks. |
I know only about |
I got a repro here which I made for the article (in works): https://codesandbox.io/embed/qzjzr583yq
Watch the console
Now the strangest part is that if you click on the little button to refresh same tag, it works perfectly.
If there is some mistake on my part, I do apologize, but I wasn't able to spot it.
You can also see error reported in #74 in here if you enter some tag that has no giphy associated.
The text was updated successfully, but these errors were encountered: