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
Functionally the same thing. I'd prefer the second one for simplistic use-cases like this.
Unknown User•14mo ago
Message Not Public
Sign In & Join Server To View
Better and better…functionally they’re the same. First one is just more verbose.
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