akiran / akiran/react-foundation-apps

Parent component setState events not triggering tab content re-renders

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

Mô tả

I have a page like this:

```
React.createClass({
onChange: function() {
this.setState({
customer: CustomerStore.getCustomer()
})
},

...

render: function() {
return (










)
}
})
```

If I update the CustomerStore with a customer (say via an asynchronous request), it
will not trigger the tab content components to re-render.

I believe that is due to the `cloneWithProps` call (https://github.com/akiran/react-foundation-apps/blob/master/lib/tabs/index.jsx#L16).

Incidentally, cloneWithProps is now deprecated and it should be `React.cloneElement`. I'm not able to
make it work even by using that `cloneElement`, though. I can think of a few workarounds but they all seem
terrible.

Any ideas?

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.