paint-brush
How to Set Default Value of Props in Vue?by@smpnjn
52,889 reads
52,889 reads

How to Set Default Value of Props in Vue?

by Johnny Simpson3mMay 15th, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow
EN

Too Long; Didn't Read

Setting default prop values in Vue is easy. If you are using the Options API, then it's as easy as extending our property into an object. In the composition API, defining props uses the defineProps function. This function follows the same syntax as props defined in the Options API.
featured image - How to Set Default Value of Props in Vue?
Johnny Simpson HackerNoon profile picture
Johnny Simpson

Johnny Simpson

@smpnjn

Product, Engineering, Web

About @smpnjn
LEARN MORE ABOUT @SMPNJN'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Johnny Simpson HackerNoon profile picture
Johnny Simpson@smpnjn
Product, Engineering, Web

TOPICS

Languages

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite