loading...

re: Sharing Data Between Components in Vue.js VIEW POST

FULL DISCUSSION
 

This approach to watching the property is very unique. Is there a usecase where it would be preferable to storing the message list in the parent or emitting events from the parent and listening in the child?

 

Hey Patrick, you are correct. The watch property section in the example is somewhat unique. I wanted this component to be able to accept a string from any source and then create an array from that inside the component.

I would be interested in seeing an example of what you are suggesting. If you have time, feel free to fork the codesandbox example.

code of conduct - report abuse