akiran / akiran/react-foundation-apps

Parent component setState events not triggering tab content re-renders

オープン
#17 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
291
フォーク
45
PR マージ指標
30日以内にマージされた PR はありません

説明

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?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。