Is it possible to do a CodePen with axios hitting a DB?



  • Hi,

    I’ve been having issues with q-table not updating after Vuex store data is refreshed. My code is too complicated to simply copy to a codepen, but I figure I at least need to use the same components in order to duplicate the issue. My DB is behind a corporate firewall, and I don’t have any online DBs I can use. Does anyone have suggestions for how I can create a representative duplicate of my code?

    What I see is this:

    1. I have a table with a column which includes action buttons (copy row, up vote, and down vote).
    2. My data has that nifty popup in place editor so I can edit the data.
    3. I do not update the Vuex data store directly before sending to the DB. Instead, I send only the change to the DB, then reload all of the data and store it again in the Vuex store. When this happens, the table does not always reflect the change!
    4. Likewise when I use any of the action buttons - no updates reflected.
    5. In both cases, changes are not reflected, but the data IS pushed to the DB and the request for new data is accomplished according to the log of my backend and the DB itself.

    If I log out of my application, then hit CTRL+F5 to hard refresh, then login, everything works like it is supposed to. That says to me there is a memory issue. I use Chrome, latest version, have had this problem for several versions.

    Alternatively, is there a way to programmatically do the same thing as a CTRL+F5?



  • @rconstantine

    Updates not being reflected sounds like you might have vue reactivity issues. Updating arrays or objects in Vue the normal js way (instead of the Vue way) results in updates not being reflected:

    https://vuejs.org/v2/guide/reactivity.html

    btw you can use https://ngrok.com/ to tunnel trough a firewall.



  • @dobbel Thanks for the reactivity note. I found this: https://stackoverflow.com/questions/59107201/vue-component-not-immediately-updating-after-associated-data-changes

    And I’m currently testing my changes. I think I mentioned that the weird thing was that SOMETIMES reactivity was working, but other times it wasn’t. I’m hoping using getters will make them always work. Note that with always refreshing the data, I was never actually updating sub-items of an array. Instead, I was replacing the whole array.

    In any case, I do think you’re right about it being a reactivity issue, so that is where I’m focused now. Thanks for the reply.


Log in to reply