Hey,
i want to include a server component into a client component. Lets imagine i have FormPage which is a client component and inside the FormPage i have a <CitySelectBox>. This should be a server component. so i ve written something like this:
`export default async function CitySelectBox() {
const supabase = //get DB client
const { data } = await supabase.from('cities').select('*');
return (
<select
name="city"
defaultValue="Berlin">
{data?.map(city => (
<option value={city.id}>{city.name}</option>
))}
</select>
);
};`
But now i get the infamous:
Error: Objects are not valid as a React child (found: [object Promise]). If you meant to render a collection of children, use an array instead.
So is my component silently degenerated to a client component, because otherwise the error wouldnt make much sense right?