You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using this addon with great success, thank you for it! https://github.com/alexlafroscia/ember-context seems to provide a consume-context helper which seems very useful. Why doesn't this addon provide one as well? Is there a particular reason or it just haven't been implemented yet?
The text was updated successfully, but these errors were encountered:
@boris-petrov the current implementation of this addon is strongly tied to the Glimmer engine's component rendering opcodes. Helpers are regular functions that get called with their provided arguments and don't typically have access to the component context they're called in.
That said, I have done some experiments with an implementation that is a little more similar to the ember-context one, where the addon keeps track of the component currently being rendered in a global variable, which could then be used in helpers or modifiers to access context. I've had success with that approach and it may even be a better way to go about it than the current implementation, though I'll have to do a little more testing to verify the stability of it before releasing that sort of change.
I'm using this addon with great success, thank you for it! https://github.com/alexlafroscia/ember-context seems to provide a
consume-context
helper which seems very useful. Why doesn't this addon provide one as well? Is there a particular reason or it just haven't been implemented yet?The text was updated successfully, but these errors were encountered: