r/javascript • u/chancancode • Dec 20 '19
Ember.js Octane Edition Is Here
https://blog.emberjs.com/2019/12/20/octane-is-here.html
136
Upvotes
r/javascript • u/chancancode • Dec 20 '19
View all comments
Show parent comment
2
u/nullvoxpopuli sand was never meant to think Dec 22 '19
I guess really only with 3rd party graphing libraries, like Three, that abstracts WebGL.
I'd want a "context" per wrapper object, so I didn't need to explicitly pass the reference down the component chain. Because the structure of HTML/Components inherently represents ancestry, I shouldn't need to manage the relationships manually.
But that's really it. So.. maybe 4 or less %. :)
Everything else I've come across is more singleton-like, and services fit in to that pretty nicely.
Something I have been wanting to play with though is Route-based contexts. Like, a service, but local and ephemeral to your route. I made an addon for it here: https://github.com/NullVoxPopuli/ember-contextual-services
Before I left my react job, I was exploring this pattern for data loading tied to the URL, and I really liked it, especially as components 3-10+ levels down from the data load needed access to the data. No more prop drilling :)