Update: I've recently implemented VUEX to efficiently manage and store all my data.
I'm currently facing an issue with data synchronization between components in a container. Although each component's data is stored within the container, it does not update dynamically. Here is an example of the code structure:
Container "father.vue"
import JobDetails from 'components/searchPosition/jobDetails.vue'
export default {
components: { JobDetails },
data () {
return {
attributes: {
jobTitle: JobDetails.data().jobTitle,
...more data...
}
}
Component "son.vue"
export default {
components: {},
data () {
return {
jobTitle: 'Test',
...more data...
}
}
When trying to display the jobTitle in the template, it does not reflect changes live as expected:
<pre>
{{ attributes.jobTitle }} < This value is an input field; changing it doesn't update the container data
</pre>
Is there a method to achieve real-time data synchronization between components?