akiran / akiran/react-foundation-apps

Parent component setState events not triggering tab content re-renders

Ouverte
#17 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
291
Forks
45
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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?

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.