https://jsfiddle.net/2xwo87bs/
In order for Vue to properly handle the object prop that is being passed to the component, it is necessary to first convert the string into an actual object. While in the provided snippet I have used JSON.parse()
as a quick solution, I am curious if there is a method to directly pass a JavaScript object as a prop without it being treated as a string. Keep in mind that I will be using the component multiple times, so creating separate data()
objects to pass as props for each instance would not be practical.