vue-meteor-demo icon indicating copy to clipboard operation
vue-meteor-demo copied to clipboard

Access to Vuex state within supply definition

Open piniondna opened this issue 7 years ago • 0 comments

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.

piniondna avatar Aug 10 '17 00:08 piniondna