DEV Community

Discussion on: Pass props to dynamic Vue components

Collapse
 
jwkicklighter profile image
Jordan Kicklighter

Thank you! As the components start to take more props and the number of different components grows, you can make things even more readable by moving a lot of logic into separate functions. The result is a step-by-step story on how each type of lost item is created, and it's much more readable than other solutions I've tried.

Collapse
 
chrstnfrrs profile image
Christian Farris

Have you tried implementing this with the Vue3 composition API? I feel like that would make it better for larger use cases.

Thread Thread
 
jwkicklighter profile image
Jordan Kicklighter

I haven't, but it may help with that. From what I understand of that API, we would potentially be able to describe the history computed value in a more readable fashion. Is that what you're thinking?

Thread Thread
 
chrstnfrrs profile image
Christian Farris

Yep!