hyperstack-org / hyperstack-org/hyperstack

investigate having Tag#method_missing define method if found

Aperta
#182 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
JavaScript
Stelle
538
Fork
41
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

The `method_missing` method in the Tag module does a rather expensive lookup to find the component class corresponding to the component method. We should experiment with defining the method once its found.

The only problem is that this will break obscure cases where component classes get redefined in new scopes. For example say you have a component `Foo::Baz` and you mount it within the `Foo::Bar::Bogus` component. Later you define a component `Foo::Bar::Baz`. If you don't dynamically lookup the component everytime, you won't find the new Baz.

I guess you could fix this by keeping track of all the components that have been defined, and then remove them if the new definition shadows them.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.