Skip to content

Is it possible to yield all the arguments without having to wrap component? #24

@yantakus

Description

@yantakus

Having to do this:

const MutationWrapper = ({ 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions