Open hristowwe opened 2 years ago
renderNoMoreCards
expects a react view to render whenever the cards are empty.
Currently there is no event handler for empty cards, but you can implement a custom component for renderNoMoreCards
and put the navigate side effect on useEffect
.
This could work.
I tried ti ran following code
But i got error
Warning: Cannot update a component (
ForwardRef(BaseNavigationContainer)) while rendering a different component (
SwipeCards). To locate the bad setState() call inside
SwipeCards, follow the stack trace as described in https://reactjs.org/link/setstate-in-render
It is happened when i use navigation.navigate in renderNoMoreCards. How can i fix that? Or i cant use navigate like that?