partizan, to vuejs

#vuejs #typescript

I'm trying to use generic type with vue composition API, and getting an error.

import { ref } from "vue";

function useContext<T extends BaseContext>(v: T) {  
 const context = ref<T | null>(null)  
 context.value = v  
 return {context}  
}

interface BaseContext {}  
src/main.ts:5:3 - error TS2322: Type 'T' is not assignable to type 'UnwrapRef<T> | null'.  

Is this a bug, or am i doing something wrong?

kkarhan,

@partizan you typed ``` not ```` so it doesn't do ...

partizan,

@kkarhan let me check...

print("hello")  

Markdown should work with three ` whatever is this called. But mastodon uses client-side markdown render, so it works only in some clients (like Elk).

niconoe, to django

Hey, I am currently looking for my next freelance mission.

Keywords: #django, #gis, #biodiversityinformatics #vuejs #typescript #postgresql #foss #opendata ...

More details on https://www.niconoe.eu!

thomastospace, to vuejs
@thomastospace@phpc.social avatar

Recently I started on a #Vuejs project at my new job. I've only worked with #Angular before.

One thing I didn't like it first, turned out to be an unexpected strength. In Angular, each component has a separate template, typescript & sass file. In Vue.js this is all inside a single file! Ugly and hard to use I thought.

Instead, it's a blessing. When a component reaches 100-150 lines, it already feels like a large component. Any larger? Time to split it up. It helps keep code clean.

pierstoval,
@pierstoval@mastodon.social avatar

@thomastospace benchmarks will matter for identical applications, especially big ones. Here, the runtime performances are less than 10% of others, so we can say that it's insignificant and even the doomed virtual DOM of react and Vue don't cause too much overhead.

However, I wish we could have a more complex application with processed CSS (like tailwind) to have more accurate comparisons, but it needs more thinking and I already spent too much time on these benches 😅

pierstoval,
@pierstoval@mastodon.social avatar

@thomastospace the conclusion to my benchmarks so far isn't about runtime performance but rather build time, size, and amount of dependencies, and in this case, Svelte has a pretty high score.

Last check which isn't shown here is the code complexity for the same features, and IMO svelte wins again. Setup is quick, and understanding of base features of the framework are straightforward, which isn't the case for Vue and React.

joe, to javascript

I just saw v-cloak for the first time in an app.

https://vuejs.org/api/built-in-directives.html#v-cloak

#vue #vuejs

feudjais, to vuejs French
@feudjais@eldritch.cafe avatar

Des bons tutos gratuits sur #Vuejs (version 2) à recommander ? :)

Merci par avance !

#Dev #JavaScript

cjerrington, to vuejs
@cjerrington@mstdn.social avatar

Got my #Vuejs app into #Docker tonight. This might be a game changer on my deployments for this small utility!

box464, to vuejs
@box464@mastodon.social avatar

Stuck on a single concept in #VueJS that just isn't clicking in my head this weekend. Emits, which seems fairly important! Frustrating, but I'll get through it. Maybe some sleep will help.

nextcloud, to php
@nextcloud@mastodon.xyz avatar

Interested in developing with Nextcloud? 💙 We develop with #PHP and #VueJS, so whether you're frontend, backend or full-stack this tutorial helps you set up your locally running development environment via #Docker 🐳: https://dev.to/daphnemuller/developing-with-nextcloud-part-1-setting-up-for-development-677

rohrkrepierer,

@nextcloud It's high time to deprecate PHP and switch to something better. Golang would be a nice replacement.

khalidabuhakmeh, to javascript
@khalidabuhakmeh@mastodon.social avatar

Folks who do development with a frontend framework (, , ), is your frontend code part of the solution, or have you split the backend and frontend into separate isolated folders?

I have thoughts, but would love to hear what your thoughts are. Boosts are appreciated.

dazzknowles,

@khalidabuhakmeh separate folder within the same repo. We work full stack so one dev may make changes to the API and FE as part of the same change so it’s nice to see all the changed files in the same commit.

LayZee,

Here is a .NET Nx workspace set up using nx-dotnet, , and Actions https://github.com/LayZeeDK/github-actions-nx-dotnet

wogan, to Laravel

I'm sure these have been done to death already, but I'm thinking about doing an end-to-end project build (maybe, cloning Twitter) using #PHP, #Laravel, #VueJS and #PostgreSQL - and then documenting the entire thing on YouTube.

I'm almost positive that there are already video series out there doing this exact thing, so I'm trying to work out what would make my approach to it any more unique.

wogan,

@GrahamDowns I'll definitely dig into how feasible that is - a big chunk of making ActivityPub work is that your server has to be reachable from other servers, you can only get so far with purely-local testing, but that too is OK - I'd include CI/CD in the project.

hnygd,

@wogan @GrahamDowns …and you could upload it to and .

schizanon, to javascript

The longer you have #calckey open the more memory it uses. It will always crash eventually. I blame #vue #vueJS #webDev #javaScript #memoryLeak

schizanon,

@brawaru where in memory though? If it's the DOM then I still blame Vue. Even a footgun can be used safely.

brawaru,
@brawaru@mstdn.social avatar

@schizanon there a few VNodes (Virtual DOM node) held in memory when you're browsing federated feed, but that's normal for any framework using Virtual DOM, however the majority of the data is not Vue stuff.

Open DevTools and take heap snapshot. Browse for a while, take another snapshot, switch to comparison mode and see what has been added to the memory.

Vue has nothing to do with this issue: no framework — React, Svelte, whatever — would've saved you from leaky store and post contents parser.

judicodes, to react

Frontend Devs, where are we currently standing in the debate React vs. Vue.js? Or is something entirely different already taking over (SolidJS, Ember.js, Svelte, ...)?

For years, it seemed like React was almost the only way to go. Now I feel like the winds are changing and other frameworks/libraries are gaining traction.
What do you all think?

#frontend #softwaredevelopment #coding #react #vuejs

judicodes,

@lukem Thumbs up for the blog post - would like to read how React and Vue compare for you! I like Vue a lot, ditched it a while back because I felt like I should spend some time on React, but now I might go back to Vue. 😄

lukem,

@judicodes the problem is I don't know much of Vue, so far my experiences have been rather brief - I gotta do some small side project to get a taste of it.

Butt. I do have opinions on React. Oh I do have opinions.

secusaurus, to Laravel

I've got a sprint ahead with the goal to implement on backend with frontend (and another third party app on .NET). The single factor (using with ) exists already (three years in production).
I do not like to use too many dependencies, but obviously doing it all by myself can be a high security risk as well.
However, all "plugins" I found for Laravel usually use their own frontend (blades) as well which I cannot use here.

Any ideas/input/experience on
a) the first steps for migration 1FA -> 2FA
b) using TOTP (which might be less pain for development) or rather FIDO2 (which I'd prefer but do I need to rebuild the whole authentification process?)

Especially mentioning @valorin here, but appreciate any vujes / developer as well ;-)

Thanks for sharing your thoughts already!

valorin,

@secusaurus
I've seen two different ways to implement MFA into a Laravel app:

  1. Tie it into the auth layer, so the creds are verified by then MFA needs to occur before the session is established. That's the nicer solution, but it generally involves rebuilding/replacing your auth process to achieve in an elegant way.

  2. Use a global middleware that enforces MFA when the user is authenticated. This is definitely easier, as the MFA layer can be completely separate from the Auth layer. You just need to ensure the middleware is applied everywhere, i.e. in global middleware not route middleware.

Even if you're only going to support a single MFA method, I'd suggest building it to support multiple, so you can add in FIDO2, etc, later.

Also look at Passkeys - although these replace the auth process itself, so that's a different topic.

I hope that helps! (Sorry for the delayed response.)

valorin,

@secusaurus that's awesome, nice work!

nhoizey, to javascript French
@nhoizey@mamot.fr avatar
bobmonsour,

@nhoizey @davatron5000 interesting read…there’s all this stuff going on under the hood that I know very little about. I’m happy to work with #11ty and learn some js along the way as needed.

Liquidream, to gamedev
@Liquidream@mastodon.gamedev.place avatar

I've posted a DevLog 📝 to my #Patreon covering more 🗺️ #SAGEngine new features:
• Now a proper PWA
• Video backdrops
• Built-in Code Editor
• Actors (with Close-ups!)
• ...and much more!

Will it be finished in time for me to build something for #AdvJam2023 ..? 🤷‍♂️

❤️ https://www.patreon.com/posts/83758393

#GameDev #IndieDev #PointAndClick #PixiJS #VueJS

video/mp4

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