acdlite / acdlite/flummox

getStore (store lookup) by using the Store class or other mechanism

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

Mô tả

I came across this 'requirement' while looking around my views to see who was using a particular store. Before when using singleton approach was easy to spot out my dependencies with my stores since I would have an explicit require on my views. Now with flummox I have strings to look up for the stores, it's very intuitive but a bit hard to find in the code when you have 10+ stores and many views around the app.

It would be kind of conceptually weird but would be nice maybe to say in the view that I want to get an store, something like

``` js
import ItemStore from '../stores/ItemStore';

fluxMixin([ItemStore])
```

This would leave a clear dependency declaration on the views and any other places of my app that use that store.

Again, seems a bit controversial to just require the file to get the 'class object' to do a look up, but leaving apart the implementation the issue itself feels like worth exploring when you have a big app and big team.

Thanks!

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.