burnstony#1975B
Convex Community2y ago
11 replies
burnstony#1975

between components

how do I pass the selected _id from one component to another
so far trying this
<>
      <p>Welcome {viewer}!!!</p>

      <p>
        <SelectPodcast podcasts={podcasts} />&nbsp;&nbsp;<PodcastNumber />
        <Episode podcast_id={podcasts[0]["_id"]} episode_number={1} />
      </p>

    </>

getting this error
Unhandled Runtime Error
TypeError: Cannot read properties of undefined (reading '_id')

Source
app/add_dates/add_dates.tsx (79:41) @ SignedInContent

  77 |   <p>
  78 |     <SelectPodcast podcasts={podcasts} />&nbsp;&nbsp;<PodcastNumber />
> 79 |     <Episode podcast_id={podcasts[0]["_id"]} episode_number={1} />
     |                                     ^
  80 |   </p>
  81 |
  82 | </>
Was this page helpful?