I'm learning Vue.js and have been able to write a simple list/detail application. Selecting the first item renders the detail component with the correct data, however when I select a different item the detail component doesn't reload with the right information.
For example:
<template> <div> <detail :obj="currentObject"></detail> </div> </template> <script> export default: { data: function(){ return { currentObject: null, objs = [ {name:'obj 1'}, {name:'obj 2'} ] }; } } </script> When I do this.currentObject = objs[0] the component detail updates with the correct content. However the next time I call this.currentObject = objs[1], the component detail no longer updates.