Sniberb
Sniberb7mo ago

snowberb – 09-35 Jan 2

What's better? const header = isPhone ? intl.formatMessage({ id: 'testimonials.titleMobile' }) : intl.formatMessage({ id: 'testimonials.title' }); or const header = intl.formatMessage({ id: isPhone ? 'testimonials.titleMobile' : 'testimonials.title' });
4 Replies
Nesho
Nesho7mo ago
Functionally the same thing. I'd prefer the second one for simplistic use-cases like this.
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
Nesho
Nesho7mo ago
Better and better…functionally they’re the same. First one is just more verbose.
reactibot
reactibot7mo ago
This thread hasn’t had any activity in 36 hours, so it’s now locked. Threads are closed automatically after 36 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1191676125051637810