oblador / react-native-collapsible

Animated collapsible component for React Native, good for accordions, toggles etc
MIT License
2.47k stars 452 forks source link

renderContent must be setState to be refreshed? #316

Open s349856186 opened 5 years ago

s349856186 commented 5 years ago

I used the Accordion with mobx,but can't refresh the view of renderContent

iRoachie commented 5 years ago

See https://github.com/oblador/react-native-collapsible/issues/157#issuecomment-381661363

s349856186 commented 5 years ago

@iRoachie Thanks for your reply. image image

The problem I encountered is that the components in the renderContent cannot update their status, as shown in the figure. I used the Mbox variable to mark their status. Can you help me?

rajngarg commented 4 years ago

I am having the same issue

laurpantelimon commented 4 years ago

Me too. In a functional component renderContent seems to be updated only once, not on every useState function call. I am not relying my update on mobx on redux, simple state change.

jplandry908 commented 4 years ago

Same here. My renderContent is using a state variable but after the content is loaded, it never refreshes when the state variable is updated.

wahidshadab commented 2 years ago

same here