Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

262
Views
how to link Touchableopacity Youtube with TMDB API object?

I'm creating an app of movies/series Database and its almost done,there is a problem. I created a button that goes to youtube to see the trailer of movie but it doesn't work.

I tried two things but they didn't solve my problem:

<TouchableOpacity onPress={() => {
                  Linking.openURL('https://www.youtube.com/watch?v=${details.key.toString()}');
                }}
                >  
<TouchableOpacity onPress={() => {
                  Linking.openURL('https://www.youtube.com/watch?v=${details.key}');
                }}
                >  

{details.key} is the key of movie in youtube trailer, any solutons please?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Use backtick instead of single quote and make sure details.key exist. Maybe something like:

`https://www.youtube.com/watch?v=${details?.key}`

The question mark makes sure details data is fetched.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!