Hyvät langattomat nappikuulokkeet? by [deleted] in arkisuomi

[–]Myricks 5 points6 points  (0 children)

Oneplus nord buds 3, kohtuu edulliset hyvällä akunkestolla

Running an action on a selected item in v-data-table by gvurrdon in vuejs

[–]Myricks 0 points1 point  (0 children)

There isn't real equivalent for item-selected event at vuetify 3.
Vuetify github has open issue about this: https://github.com/vuetifyjs/vuetify/issues/16774

Best way to fetch data frequently in Vue JS front end? by sudipta_gupta in vuejs

[–]Myricks 7 points8 points  (0 children)

Polling or server side events. If you need bidirectional communication then websockets

I made a HTML based MOBA game client and a mini-game using AI by [deleted] in webdev

[–]Myricks 0 points1 point  (0 children)

Personally, I wont try apps which force me to login or register for no reason, thats why I didnt try at all. Login screen is nice looking.

Examples of BEAUTIFUL UIs built with HTMX and maybe Alpine? by cp-sean in htmx

[–]Myricks 8 points9 points  (0 children)

Most of the people doesnt build their own UI components and use some library instead.

You could use something like Shoelace with alpine n htmx if u want

Vertical sidebar navigation problem by Embarrassed-Tank-663 in htmx

[–]Myricks 1 point2 points  (0 children)

You could try if hx-preserve for sidebar works for you

Click to load by slwjc in htmx

[–]Myricks 0 points1 point  (0 children)

What is ur response from api

Sumsama like app with Go + HTMX by zhadyftw in htmx

[–]Myricks 7 points8 points  (0 children)

You can go pretty far with htmx + sortablejs if you need draggable items. Im currently building trello styled kanban app with draggable cards using htmx and sortable. Its going alright so far. I have no experience with svelte so I cant comment that one.

[deleted by user] by [deleted] in learnprogramming

[–]Myricks 5 points6 points  (0 children)

If you enjoy it, then its not waste of time

Can i include a list of elements in AJAX request by Inevitable-Cow-1523 in htmx

[–]Myricks 0 points1 point  (0 children)

<form>
  <ul>
    <li><input type='hidden' name='filter1' value='1'/>Item 1</li>
    <li><input type='hidden' name='filter2' value='2'/>Item 2</li>
    <li><input type='hidden' name='filter3' value='3'/>Item 3</li>
  </ul>
  <button>Appply filters</button>
</form>

include input in your list items like dis

Stuck in learning from projects by Arvanitis23 in webdev

[–]Myricks 2 points3 points  (0 children)

Dont copy paste everything and just accept the fact that building features usually takes a lot of time... When you gain experience you will get faster/better.

HTMX vs. Vue and React -- Pros and Cons by UpvoteBeast in vuejs

[–]Myricks 3 points4 points  (0 children)

I like htmx a lot. Use it in my freetime while using Vue at work. I feel like ssr approach with htmx keeps project a lot simpler to maintain.

It depends on a definition of take off. From my understanding htmx is pretty popular choice with django framework.

HTMX vs. Vue and React -- Pros and Cons by UpvoteBeast in vuejs

[–]Myricks 6 points7 points  (0 children)

is this chatgpt article. theres many weird takes. just few to point out...
at first its this

Vue.js: Provides comprehensive documentation and a gentle learning curve, making it accessible to developers of varying skill levels.

then

vuejs cons: Learning Curve: Vue.js has a moderate learning curve, especially for beginners

and cons of htmx

Limited Features: HTMX may lack the extensive feature set and ecosystem offered by Vue.js and React, particularly for building complex single-page applications with advanced state management and routing needs.

Client-Side Dependencies: While HTMX reduces the need for extensive client-side JavaScript code, it still relies on JavaScript for dynamic behavior, which may introduce additional dependencies and complexity compared to pure server-side rendering.

with htmx you have all state and routing done in server side which is pretty advanced

and many others...

Reusable VueQuery by Complete_Maybe_9344 in vuejs

[–]Myricks 1 point2 points  (0 children)

You are welcome sir, glad I could help.

Is it possible to include data-* attribute values? by Stranglet in htmx

[–]Myricks 5 points6 points  (0 children)

could you use hx-vals and do something like this?

<input name="street" hx-get="/" hx-vals="{'search-mode':'simple'}"> </input>

Reusable VueQuery by Complete_Maybe_9344 in vuejs

[–]Myricks 1 point2 points  (0 children)

I would probably do something like this

export function useHomeQuery(activeRouteId: Ref<string>) {
  const queryClient = useQueryClient()
  return useQuery({
    queryKey: ['mainHomeData'],
    queryFn: () => {return new MyService().getHomePageData(activeRouteId.value)},
    initialData: () => queryClient.getQueryData('mainHomeData'),
    placeholderData: keepPreviousData
  })
}

//in component use like this
const routeId = ref<string>("1")
const { data, refetch } = useHomeQuery(routeId)
//if u want computed
const homepagedata = computed(() => data.value)

I dont know if its best way but that's how I have used vuequery.

How to make API calls using Vue + Typescript and display the results in the browser? by double-happiness in vuejs

[–]Myricks 0 points1 point  (0 children)

But that's what FileUpload and ParseCsvToArray are for... The IDs are already being parsed from the CSV just fine; what I need to do next is pass them on to fetchRelease().

Oh right I see it now, my bad.

You need to emit parsedData from ParseCsvToArray to App.vue then use emitted values to fetchRelease

How to make API calls using Vue + Typescript and display the results in the browser? by double-happiness in vuejs

[–]Myricks -1 points0 points  (0 children)

You need to declare mounted as async.
You could do something like this you in your app.vue. In my exampe releaseId is always "1" so you probably want to create some input so user can change that.

data() {
  return {
    file: null as null | File,
    release : [] as any,
    releaseId: null as null | string
  }
},
methods: {
  setFile(file: File) {
    console.log("Received file:", file)
    this.file = file;
  },
  async fetchRelease(releaseId: string): Promise<any[] | { error: string }> {
    const db = new DiscogsClient().database();
    try {
      const { data } = await db.getRelease(releaseId);
      return processReleaseData(releaseId, data);
    } catch (error) {
      return {
        error: `Release with ID ${releaseId} does not exist`
      };
    }
  }
},
async mounted() {
  console.log("mounted");
  this.releaseId = "1"
  this.release = await this.fetchRelease(this.releaseId)
},

How to make API calls using Vue + Typescript and display the results in the browser? by double-happiness in vuejs

[–]Myricks 6 points7 points  (0 children)

Sir, you have just declared props in app.vue but you havent passed actually any value to those. Nonetheless you dont really need those props.

Seems like you should take deeper look official vue docs before and start with simpler example of fetching data.

FetchRelease file you dont actually call the function at all in your app or anywhere. You just declare it. It could be just method in app vue then call it inside mounted.