I have an array in host element which is passed to target element using binding. Now, I would like to change the array data in my target element making sure that the array data in my host element is also updated when I make changes to array in target element.
This are the steps you need to check :
At child element (in your term : target) , you need to declare property with notify:true
static get properties() {return {
myArray: { type:Array, notify:true }}}
Allow two-way binding at the parent (your word: host) with curly brackets
something like:<child-elem my-array="{{myArray}}"></child-elem>
At the child element, you need to modify array with some of below in order to observable changes at parent;
this.push(path, item1, [..., itemN])
this.pop(path)
this.unshift(path, item1, [..., itemN])
this.shift(path)
this.splice(path, index, removeCount, [item1, ..., itemN])