You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi so I have two child component Cart and Orders in parent component App
Cart have mutations with variables A, B, C.
In the example we have :
$: books.refetch({A, B, C });
but $books query are also in the same component.
After this I want its sibling Order to update the orders.
How could I communicate between them?
The text was updated successfully, but these errors were encountered:
AnnieTaylorCHEN
changed the title
How to update parent component query values when child component have mutations?
How to update child component query when its sibling child component does a mutation?
Aug 20, 2020
Sorry for the late reply, basically you should either store the state in the parent App component or if they're not direct descendants then you could use svelte's context API
Hi so I have two child component Cart and Orders in parent component App
Cart have mutations with variables A, B, C.
In the example we have :
$: books.refetch({A, B, C });
but $books query are also in the same component.
After this I want its sibling Order to update the orders.
How could I communicate between them?
The text was updated successfully, but these errors were encountered: