Skip to content

Access to Vuex state within supply definition #11

Open
@piniondna

Description

@piniondna

I'm confused on how to access Vuex state from within the supply. For example, I have a subscription which relies on reactive state being stored in Vuex. In a component using vue-tracker I used this syntax:

meteor:
	$subscribe:
		results: -> [{ids: @resultIds, sortType: @currentSort, sortOrder: @currentOrder}]

	results:
		deep: yes

		params: ->
			ids: @resultIds
			sortType: @currentSort
			sortOrder: @currentOrder

		update: ({ids, sortType, sortOrder}) ->
			Results.find({ id: { $in: ids } }, { sort: [[sortType, sortOrder]] } ).fetch()

Is something like this possible with vue-supply? Can supply values be set from Vuex? The example in vue-meteor-demo is too basic to communicate anything but the most generic use of this component, but it's totally possible I'm missing some basic insight on how to use these together.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions