Text strings must be rendered within a text component react native

Hello Everyone
Am facing an error message which I have no idea where is it located, let alone know how to troubleshoot. Screenshot of the error message is below.

Please find my code below

import {StyleSheet, View, Text} from ‘react-native’;
import React from ‘react’;
import ReactWeather, {useWeatherBit} from ‘react-open-weather’;

const App = () => {
const {data, isLoading, errorMessage} = useWeatherBit({
key: “b3b57b32b3bf44fabab0713e3362322b”,
lat: “48.137154”,
lon: “11.576124”,
lang: “en”,
unit: “M”,
});
return (

<ReactWeather
isLoading={isLoading}
errorMessage={errorMessage}
data={data}
lang=“en”
locationLabel=“Munich”
unitsLabels={{temperature: “C”, windSpeed: “Km/h”}}
showForecast
/>

)
}

export default App;

const styles = StyleSheet.create({
container: {
flex: 1,
},
});

Can you please show us your code of the ReactWeather component?

Hello Sufian, please find my code below:

import {StyleSheet, View, Text} from ‘react-native’;
import React from ‘react’;
import ReactWeather, {useWeatherBit} from ‘react-open-weather’;

const App = () => {
const {data, isLoading, errorMessage} = useWeatherBit({
key: “b3b57b32b3bf44fabab0713e3362322b”,
lat: “48.137154”,
lon: “11.576124”,
lang: “en”,
unit: “M”,
});
return (

<ReactWeather
isLoading={isLoading}
errorMessage={errorMessage}
data={data}
lang=“en”
locationLabel=“Munich”
unitsLabels={{temperature: “C”, windSpeed: “Km/h”}}
showForecast
/>
)
}

export default App;

const styles = StyleSheet.create({
container: {
flex: 1,
},
});

You’re using a React.js dependency and it isn’t compatible with React Native, therefore it causes the issue.

This repository is doing something similar to what you’re aiming to do:

okay thanks for reply. Can i implement the repo code in my application, as i am using bare react native in my application. Does your repo work for bear react native application.

It’s not my repo. :slightly_smiling_face:

With bare workflow, you can do anything, so yes you can.