Open coolersham opened 1 year ago
+1 Same issue here, RN 0.71 + new arch enabled. react-native-paper version: 4.12.5!
+1 same issue, RN 0.73.2, react-native-paper: 5.12.3. did you happen to find a workaround?
There's a PR open for this currently! https://github.com/callstack/react-native-paper/pull/4447 See also: #4445
Current behaviour
Showing the
Snackbar
component via thevisible
property seems to be broken when the new architecture with itsFabric
renderer is enabled. The component is simply not showing up upon toggling the corresponding flag. When trying to hide the still not visibleSnackbar
, it flashes up and immediately hides again.This is only noticeable when using the implementation with the new architecture of
react-native
onAndroid
devices. The old architecture is not affected by this problem on either of the two major mobile platforms.Expected behaviour
The behaviour of showing and hiding the
Snackbar
component should work the same way with both architecture approaches.How to reproduce?
react-native
example project (e.g. via CLI template) and install all dependencies via your favourite package manager.App
file and build the application with the new architecture disabled at first.export default function App() { return (
) }
function Content() { const [visible, setVisible] = useState(false) const onToggleSnackBar = () => setVisible(prevState => !prevState) const onDismissSnackBar = () => setVisible(false)
return (
) }
const styles = StyleSheet.create({ container: { flex: 1, justifyContent: "center", }, })