Cannot update a component (`MessageScreen`) while rendering a different component (`Swipeable`)

Warning: Cannot update a component (MessageScreen) while rendering a different component (Swipeable). To locate the bad setState() call inside Swipeable, follow the stack trace as described in Bug: too hard to fix "Cannot update a component from inside the function body of a different component." · Issue #18178 · facebook/react · GitHub