AOSSIE-Org / AOSSIE-Org/BabyNest
BUG: Fix "Text strings must be rendered within a <Text> component" error in SymptomsScreen
- Vorherrschende Sprache
- JavaScript
- Sterne
- 56
- Forks
- 123
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
### Is there an existing issue for this?
- [x] I have searched the existing issues
### What happened?
## 📌 Issue Overview
Problem:
Users were encountering a "Text strings must be rendered within a component" error when interacting with the Symptoms screen, specifically when rendering the list of symptom history. This error typically occurs in React Native when whitespace or text characters exist directly inside a View component without being wrapped in a Text component.
## 🔍 Steps to Reproduce
Root Cause:
1. In SymptomsScreen.jsx, there was loose whitespace/formatting in the JSX where the "Week" number was being rendered inside the history card.
2. In HeaderWithBack.jsx, a JSX comment ({/* Spacer ... */}) was placed after a View component. In some contexts, this can be interpreted as a text node or introduce unwanted whitespace.
## 🎯 Expected Behavior
## 🚨 Actual Behavior
## 📷 Screenshot
## 💡 Suggested Improvements
1. Refactored the JSX in [SymptomsScreen.jsx](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html) to remove unnecessary whitespace around the "Week {entry.week_number}" text node.
2. Removed the inline comment in [HeaderWithBack.jsx](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html) to ensure clean rendering of the layout spacer.
### Record
- [x] I agree to follow this project's Code of Conduct
- [x] I want to work on this issue
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.