Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access to Vuex state within supply definition #11

Open
piniondna opened this issue Aug 10, 2017 · 0 comments
Open

Access to Vuex state within supply definition #11

piniondna opened this issue Aug 10, 2017 · 0 comments

Comments

@piniondna
Copy link

piniondna commented Aug 10, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant