calintamas / react-native-toast-message

Animated toast message component for React Native
MIT License
1.66k stars 258 forks source link

Error: Text strings must be rendered within a <Text> component #398

Closed itea2828 closed 1 year ago

itea2828 commented 2 years ago

In latest version of expo I am getting the following error

tankers746 commented 2 years ago

Seems to be an issue when title is an empty string

HaithamOumerzoug commented 2 years ago

You have to specify the toast title. const showToast = (type, title, body) => { Toast.show({ type: type, text1: title, text2: body, // ...other options }); };

tyartyartyar commented 1 year ago

@itea2828 happened to me as well after updating to version ^2.0.0 resolved 2.1.5 it throws this error when either text1 or text2 is empty string, try to give some whitespace (e.g " ") for temporary workaround 🍻