-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Description
I understand that functional components are instanceless, but given that they still have access to the parent context, wouldn't it make sense to also give them access to provided ancestor properties?
For example, I created vue-mobiledoc-editor. In the current version, I used a shared Vue instance that I passed to the editor and button components so that they could communicate with each other; and since there were various types of buttons (e.g. section, markup, and link buttons), I made the component functional.
I want to upgrade the code to using provide/inject since not having to pass the shared instance to every component makes the code more maintainable and will also make it easier to create multiple editor instances. However, it is not possible to inject exposed ancestor data and methods in functional components. If there is no specific reason for this, I'd like to make this a feature request.