I am currently utilizing Vue and Vuex to dynamically generate components from an array retrieved from SQLite using the library better-sqlite3.
let table=[
{
id:1,
column_1:'data',
column_2:'data',
column_3:{'1':'data','2':'data','3':'data'}
},
{
id:2,
column_1:'data',
column_2:'data',
column_3:{'1':'data','2':'data','3':'data'}
},
...
]
In certain scenarios, it is necessary to update the data of multiple rows simultaneously. Considering the need to exchange data between SQLite and Vue, I am contemplating whether updating the data with SQL and then replacing the entire JavaScript array with the updated information, including the unaltered rows, would be a simpler and safe approach. Alternatively, I could iterate through the array using .find()
to pinpoint and modify specific items. Therefore, my inquiry revolves around whether substituting the complete array is detrimental in terms of reactivity or if Vue can intelligently handle updates.