dOrgTech / dOrgTech/arc.react

Only Rerender "DAO Connected" Components

Đang mở
#3 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
hi-pri perf-enhancement
Ngôn ngữ chính
TypeScript
Star
21
Fork
9
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Only rerender components that are "DAO Connected".

This can be done through supporting a subscription model, where components that depend on additional contextual information (ex: , ).

For example, consider...
```html





{data => (

)}

```
Ideally, if Arc.Config's web3 provider changes, View1 & 2 shouldn't have to rerender, but View3 should because the data may be different. This can be partially achieved if DAO connect's the Arc.Config's subscriber list, which will cause it to be told to rerender if the config ever changes, but this only causes View1 to not be rendered. View2 would still be rendered because currently the data is stored within the Component's state (the DAO's state), which would cause View2 to still be rendered.

Going to leave this here for now, as it'll be interesting to come back to this after some metrics have been gathered, as I feel this may be premature optimization.

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

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đá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.