hyperstack-org / hyperstack-org/hyperstack

investigate having Tag#method_missing define method if found

Đang mở
#182 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
JavaScript
Star
538
Fork
41
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.