42GB,

deleted_by_author

  • Loading...
    42GB,

    So, I guess it is not the best way to learn JavaScript at the same time as learning a framework. But I had some achievements:

    • Started using Pinia as a store, including some watchers syncing the store to local storage.
    • Finished the OAuth flow for the Mastodon API.
    • Fetching and showing lists and followings.

    It may not sound like much, but I'm quite happy about the progress.

    demivan,
    @demivan@fosstodon.org avatar

    @42GB I recommend using Pinia plugins to work with LocalStorage. Should lead to cleaner code.

    42GB,

    deleted_by_author

  • Loading...
  • 42GB,

    Oh no... I lost reactivity for an object in a pinia store. What to look out for? Any tips for handling more complex data structures without loosing reactivity? Where are the limits? What are common solutions? So many questions but not sure what to search for atm.. fml. Seems like I miss something obvious... #vue #pinia

    demivan,
    @demivan@fosstodon.org avatar

    @42GB With Vue 3 it is extremely hard to lose reactivity, especially if you use Pinia already.
    Can you provide example code?

    42GB,

    deleted_by_author

  • Loading...
  • 42GB,

    deleted_by_author

  • Loading...
  • demivan,
    @demivan@fosstodon.org avatar

    @42GB Vue refs are deeply reactive, so reactivity should not be a problem.
    Organizing stores like in the blog post would work, if that simplifies app code, but it is not needed.

    42GB,

    deleted_by_author

  • Loading...
  • 42GB,

    @demivan Short update: Found it. It was just a bug in the function editing this array. Thanks a lot again.

    42GB, (edited )

    After solving the problem, my motivation is back. I am starting to get really excited about #vue because I realised that not only #pinia states react to changes... also getters and actions. The more I know about vue and pinia, the more structured the code becomes. I am getting closer to having all the features I need for a basic Mastodon list manager. The UI is still a mess.

    gruifor,

    @42GB I only used it very briefly a few years ago. The little frontend code I touched recently was mostly React. I don't have a preference, but I'm curious to hear what you prefer about Vue.

    42GB,

    deleted_by_author

  • Loading...
  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • ngwrru68w68
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • tacticalgear
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • mdbf
  • ethstaker
  • JUstTest
  • GTA5RPClips
  • modclub
  • tester
  • provamag3
  • osvaldo12
  • cisconetworking
  • everett
  • cubers
  • normalnudes
  • megavids
  • Leos
  • anitta
  • lostlight
  • All magazines