What I'm trying to do is that I want to add a line break between
remoteMessage.notification.title + remoteMessage.notification.body
title and body
If I use my code screen view show like this
this is my code
useEffect(() => {
const unsubscribe = messaging().onMessage(async (remoteMessage) => {
console.log(JSON.stringify(remoteMessage));
Alert.alert(
"A new FCM message arrived!",
JSON.stringify(
remoteMessage.notification.title + remoteMessage.notification.body
)
);
});
return unsubscribe;
}, []);
How can I fix my code? if I want to show like this?
title
body
'+remoteMessage.notification.body);`. – tevemadar Mar 27 '21 at 10:57