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

Allow custom 'vuex bindings' to be displayed in ComponentInspector #845

Open
jdoubleu opened this issue Dec 11, 2018 · 0 comments
Open

Allow custom 'vuex bindings' to be displayed in ComponentInspector #845

jdoubleu opened this issue Dec 11, 2018 · 0 comments

Comments

@jdoubleu
Copy link

jdoubleu commented Dec 11, 2018

What problem does this feature solve?

So far (computed) properties bound with mapState Vuex Component Binding Helper will be displayed as "vuex bindings" in the component inspector.
screenshot 2018-12-11 at 18 31 11

The helper exports a function with a property named vuex. In the devtools this property is checked for all computed properties (see here).

However, it is not possible to mark a (computed) property as "vuex bindings", if a custom userland wrapper (as supposed here) does not return a function.
This especially conflicts if the property has a computed setter and thereby is an object (see also).

This would make it possible to show another developer that a property is actually bound to the vuex state in one's app.

What does the proposed API look like?

The internal API only needs to check if the property is a "function" or an "object" in https://github.com/vuejs/vue-devtools/blob/dev/src/backend/index.js#L714.

One side-effect is that even in the component itself a property could be marked as "vuex binding". One could also want this, following the Form Two Way Binding example.

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

No branches or pull requests

2 participants