-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Text strings must be rendered within a <Text> component #1580
Comments
could u share with us an example of the values of these variables: |
Hey @selibrah, when I comment or remove the SvgUri the error disappears too. |
The problem is not reproducible on version 11.0.1 of the library. At least for me downgrading to 11.0.1 worked. :) |
Getting the same issue on 12.1.1 Expo, downgrading to 11.0.1 didn't help me, |
@selibrah could you have a look at it? |
Hey guys, I was wrong actually it is reproducible on every version of the library I try. Well, the issue is that from the external SVG I use some of them are quite broken. What I mean is that they have some texts in random places in them. I tried to make a separate call for each via the fetch API, but unfortunately even those which are broken returns status 200 and ok: true. It is a big problem because the app crashes and we can not afford this to happen on production. IF someone has any solution I will be very happy if he/she shares it with us here. Thanks in advance. |
Same happens to me |
getting the same error for this svg:
|
@NilsBaumgartner1994 you have |
This works: import { Text, View, StyleSheet } from 'react-native';
import { Svg, Text as SvgText } from 'react-native-svg';
function MyFancyText() {
return 'Hello World';
}
export default function App() {
return (
<Text>
Here is my fancy text:
<MyFancyText />
</Text>
);
} But this not: <Svg>
<SvgText y={20} fill="black">
Here is my fancy text in SVG:
<MyFancyText />
</SvgText>
</Svg> |
In my case it was due to invalid svg file. |
Hello, |
Hey guys. I have an issue for which I couldn't find any information. Most likely it is not a bug with the library but something I am doing wrong, I just couldn't figure out what can cause the problem. So The problem itself is that I receive a very strange error for which I will attach an image of my simulator.
That happens using SvgUri from the react-native-svg like this
Versions:
"react-native": "0.63.4",
"react": "16.13.1",
"react-native-svg": "12.1.1",
If some more info is needed I will add it. Thanks in advance :)
The text was updated successfully, but these errors were encountered: