Closed joeferraro closed 7 years ago
Move your ListView
to separate component and do the updates inside the component.
@satya164 cheers. For anyone else who may encounter this issue: I had to move my ListView
to a different component as @satya164 suggests, however, it's important to note I could not merely pass props from the component with SlidingTabNavigation
down to the component with ListView
. Rather, I had to connect the new component with redux in order for the ListView
to re-render as expected.
Oh man, this has been really hard to debug. Any idea why a component can't receive new props when it's inside SlidingTabNavigation?
Navigation views are pure components for performance reasons. Since the props for sliding tab navigation doesn't change, it doesn't update.
This seems related to this: https://github.com/exponent/ex-navigation/pull/361
It seems like react-navigation doesn't really handle this, either?
I'm finding that if I have a
ListView
inside aSlidingTabNavigation
that I am unable to force theListView
to re-render when itsdataSource
is updated (when theListView
is not wrapped inSlidingTabNavigation
it re-renders as expected). Is there something additional I need to do to force theSlidingTabNavigation
to re-render its children?