DEV Community

Discussion on: Using script Setup for Vue 3 SFCs

Collapse
 
alberto2000 profile image
Riccardo Lardi • Edited

Hi there, I'm getting undefined for emit as well as props when trying to import them with <script setup="props, {emit}"> as proposed. Any hint to what could be wrong? Project was created using @vitejs/app <project-name>... thanks!

Collapse
 
vukadinfe profile image
Vukadin

You can use defineProps, defineEmit and/or defineContext

twitter.com/watchmejizz/status/137...

Collapse
 
vukadinfe profile image
Vukadin

Maybe update post @alvarosaburido ?