Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

How to use object with variable in react native?

$
0
0

I am new in react native.

My question is pretty simple:I need to change subject of email with a address of consultant.example: Vul uw vraag, naam en adres in{address}

Address is object, so how to make a strings from this :{activeUser.rentalUnit?.address.street} {activeUser.rentalUnit?.address.houseNumber}{activeUser.rentalUnit?.address.postCode} {activeUser.rentalUnit?.address.city}and to make with one variable which I will use in subject and body also.Thank you all :)

    const onSendMail = () => {    Linking.openURL(        `mailto:${activeUser.rentalUnit?.complex?.email || 'info@woonzorg.nl'}?subject=${Strings.Board.EmailSubject}&body=${Strings.Board.EmailText} ${            activeUser.rentalUnit?.address?.street        }  `,    );};

Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>