This episode is sponsored by...
Welcome to Enjoy the Vue! Today is a panelists episode, your HEROES! The topic today is all about Reusable Components. Find out why props are good for some things some of the time, and it’s especially good for situations where you want to set some kind of best practice, but then having too many props is bad. Slots, Maps, Buttons, and Mixins are discussed as well. Also, find out why Ari said, “Can we throw out any code that doesn’t bring us joy?” ☺
[00:01:22] The panelists each tell us what a Reusable Component is.
[00:6:20] Chris puts an open-ended question out there to the panelists as to when are props good and when are they bad? When have you regretted using props for what kinds of use cases and when are they appropriate? Ari and Tessa both share stories.
[00:08:05] When are props useful and when would you want to use a prop over a slot? The panelists all discuss.
[00:19:04] Chris talks about creating a map, map components, map markers component, map layer component, and provide and inject. There was a good talk on the topic of provide and inject using the map example at ConnectTech 2019.
[00:21:31] Chris talks about an example using icon components.
[00:26:05] Chris goes into “buttons” for forms, such as a submit button, search button, and inline buttons and Tessa shares some issues with generic components.
[00:29:51] Chris asks the panelists if they’ve used “Mixins?” They have a discussion about it with “mixed” reviews.
[00:38:50] As a member and representative of the Vue team, Ben tells us some things people should know about the Composition API since Vue 3 has not come out yet.
Other resources mentioned: