callstack / callstack/react-native-paper
FAB.Group causes DOM nesting warning on web platform: <button> inside <button>
- Lenguaje dominante
- TypeScript
- Estrellas
- 14.5k
- Forks
- 2.2k
- Merge medio
- 5 d 23 h
- PR fusionados (30 d)
- 12
Descripción
### Current behaviour
When using the FAB.Group component from react-native-paper within an Expo project, a console warning is displayed:
```
LogBox.web.js:104 Warning: validateDOMNesting(...): cannot appear as a descendant of .
```
This warning suggests that there's an issue with the nested structure of button elements within the FAB.Group component.

### Expected behaviour
The FAB.Group component should render correctly without producing any DOM nesting warnings related to button elements.
### How to reproduce?
Create a new Expo project using the provided minimal setup.
Implement a screen with a FAB.Group component as shown in the BugFABExample component.
Run the project on web (expo start --web).
Open the browser console to observe the warning.
Here's a simplified code snippet demonstrating the issue:
```jsx
import * as React from "react";
import { View } from "react-native";
import { FAB, Portal } from "react-native-paper";
const BugFABExample = () => {
const [open, setOpen] = React.useState(false);
return (
{} },
{ icon: "email", onPress: () => {} },
]}
onStateChange={({ open }) => setOpen(open)}
/>
);
};
export default BugFABExample;
```
### Preview

### What have you tried so far?
- Verified that the issue occurs in a minimal Expo project setup.
- Confirmed that the warning is specific to the web platform.
### Your Environment
| software | version
| --------------------- | -------
| ios | x
| android | x
| react-native | 0.74.5
| react-native-paper | 5.12.5
| node | x.x.x
| npm or yarn | x.x.x
| expo sdk | 51.0.28
Guía de contribución
Línea de trabajo
Start with the BugFABExample reproduction using FAB.Group and Portal in a minimal Expo project, then run it with `expo start --web` and inspect the rendered button structure. Done means the web platform no longer logs a validateDOMNesting warning for nested button elements.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- react-native, typescript
- Área
- frontend, web-dev
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100