Helper functions for selectors/actions #53103
ryanwelcher
started this conversation in
Interactivity API
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Similar to #198, it would be very handy to have some way of outputting the values for directives without needing to type all of the paths.
For example, in the Movie Demo:
If there was were helper functions available for actions/selectors, this could be simplified to something like this:
Obviously, this is basically pseudo code and there are some other things to consider.
The namespace, for example, is not addressed in the example above. I am wondering how many times there would be multiple namespaces being defined? If that's rare, perhaps the function can make some assumptions. Maybe
wp_store
should return an instance that has these methods attached then it would be possible to have multiple store instances with different namespaces.So many ideas! 🤣
Beta Was this translation helpful? Give feedback.
All reactions