Skip to content

Store resolve() calls and full responses #5

@jeffturcotte

Description

@jeffturcotte

The store's actions should probably not pass the full axios response to the subsequent promise then() handlers. At that point HTTP doesn't really matter and should be abstracted out. This way the components that are actually calling these actions are dealing solely with the returned json.

Using response.data.data.whatever within a component feels wrong.

resolve(response)

// should be

resolve(response.data)

// if you *really* wanted access to the full response, this could work...

resolve(response.data, response)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions