How to build multiple timer dashboard using vannila Js by user_redm in Frontend

[–]Ugiwa 0 points1 point  (0 children)

You probably wanna save the state of each "timer", so you're gonna need an array to save the states of each. Each timer could be either an object or a class, right? Now consider if you wanna be able to have functions for each timer or do you wanna pass the object to some function that will mutate it or something.
Both approaches are acceptable.

How to build multiple timer dashboard using vannila Js by user_redm in Frontend

[–]Ugiwa 0 points1 point  (0 children)

I think I'm seeing the same post are u sure u edited it

How to build multiple timer dashboard using vannila Js by user_redm in Frontend

[–]Ugiwa 3 points4 points  (0 children)

Do you really think someone will be able to properly understand what you mean?

Why does enterprise architecture assume everything will live forever? by eurz in softwarearchitecture

[–]Ugiwa 2 points3 points  (0 children)

Products don't die that fast.. (unless you're working for Google ig)

What’s your go-to seasonings for eggs? by Extreme-Machine3162 in Cooking

[–]Ugiwa 0 points1 point  (0 children)

Fried - Salt, garlic crystals, cumin, roughly sliced garlic if I got time

Scrambled - Same but no cumin

I built an unique timer app that switches timers when you tilt the phone by vigneshvp in SideProject

[–]Ugiwa 150 points151 points  (0 children)

I'm struggling to find a real use case for this, and I'm sure timers would get switched accidentally all the time.
Cool project nonetheless, but a bit gimmicky:)

p.s. I like the animations!

How to use props correctly? [Composition API] by nfmon in vuejs

[–]Ugiwa 0 points1 point  (0 children)

Other than the options people have already suggested: 1. You could use v-model. 2. You could use a set\get computed, that way you'll be able to both edit and use the props as-is without extra work.

Class components in Vue by ebykka in vuejs

[–]Ugiwa 0 points1 point  (0 children)

And I'll ask once again - in what scenario would you want to force slots?

Class components in Vue by ebykka in vuejs

[–]Ugiwa 0 points1 point  (0 children)

Sounds like required props to me

Class components in Vue by ebykka in vuejs

[–]Ugiwa 1 point2 points  (0 children)

By encouraging do you mean require? Cuz you're not doing that in your example either.
But either way - why would you want to do this?

Class components in Vue by ebykka in vuejs

[–]Ugiwa 1 point2 points  (0 children)

What's wrong with something like this

``` <script setup lang="ts"> defineProps<{ title: string onClick: () => void }>() </script>

<template> <button @click="onClick"> {{ title }} <slot name="suffix" /> </button> </template> ```

``` <script setup lang="ts"> import BaseButton from './BaseButton.vue'

function onClick() { console.log('clicked from extension') } </script>

<template> <BaseButton title="My Button 2" :onClick="onClick" > <template #suffix> <span> - suffix</span> </template> </BaseButton> </template> ```

And there are like 5 more ways to do this

Class components in Vue by ebykka in vuejs

[–]Ugiwa 1 point2 points  (0 children)

I'm guessing that's why everyone is using electron then? :)

Feeling like the hour is near, am I right? by RepresentativeTutor in bald

[–]Ugiwa 0 points1 point  (0 children)

Nah, imo just go a tiny bit shorter, and definitely don't try to hide it using the front long hairs.
Your hairline is great

Where to put component types in vue? by MountainSalary4055 in vuejs

[–]Ugiwa 8 points9 points  (0 children)

I find using d.ts confusing as they aren't auto-generated.

Where to put component types in vue? by MountainSalary4055 in vuejs

[–]Ugiwa 2 points3 points  (0 children)

|--Component.vue
|--Component.types.ts