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
constMutationWrapper=({ children, ...props})=><Mutation{...props}>{(mutate,result)=>children({ mutate, result })}</Mutation>const{ mutate, result }=yield<MutationWrapper/>
when you want to access all arguments (and it's always the case with Mutation) negotiates the main benefit of epitath (at least for me) - conciseness.
I tried to read the code and understand if it is possible to return all the arg by default, but unfortunately I failed to do this quickly, so I decided to open this thread.
The text was updated successfully, but these errors were encountered:
I know this is a breaking change, but it would work for all use cases out of the box, without having to create wrappers for components with multiple arguments.
Hey, thanks for bringing this up @yantakus.
This was actually discussed at #1, but indeed, I think making the args an array would some all the problems at once.
We can probably make it the only way to use it.
The reason why it only passes the first argument is that we wanted to make the API surface as simple as possible.
Having to do this:
when you want to access all arguments (and it's always the case with
Mutation
) negotiates the main benefit ofepitath
(at least for me) - conciseness.I tried to read the code and understand if it is possible to return all the arg by default, but unfortunately I failed to do this quickly, so I decided to open this thread.
The text was updated successfully, but these errors were encountered: