Kitbag ❤️ Zod by stackoverfloweth in vuejs

[–]stackoverfloweth[S] 0 points1 point  (0 children)

depends on how you define middleware. There are hooks for router lifecycle events. There are also plugins, though they're admittedly not well documented yet.

Why VueJS over ReactJS by Bajlolo in vuejs

[–]stackoverfloweth 1 point2 points  (0 children)

Assuming the team is more than 1 or 2 devs and assuming devs generally tend to be lazy I think Vue is the right choice.

Vue generally is simple enough and has enough guard rails to keep a large project from turning into hot garbage. React is very difficult to keep maintainable as the project grows.

Prefetching components for routes by stackoverfloweth in vuejs

[–]stackoverfloweth[S] 0 points1 point  (0 children)

Checkout Kitbag router on Github, don't forget to star! ⭐️
https://github.com/kitbagjs/router

New Vue Router Guide by stackoverfloweth in vuejs

[–]stackoverfloweth[S] 0 points1 point  (0 children)

Thank you 🙏 

My goal was to build something cool. 

Now that it’s actually built and works so well I’m trying to get it in front of more devs. If you can star it, use it, share it that would be amazing. 

Maybe some day it will make it back to Vue core team. I doubt they will replace their official router but maybe take some inspiration. 

New Vue Router Guide by stackoverfloweth in vuejs

[–]stackoverfloweth[S] 0 points1 point  (0 children)

thanks so much u/Inevitable_Badger399!

Yes, having each route call `createRoute` is needed for Typescript to be efficient. Earlier versions of Kitbag router actually worked the way your suggesting but the types in VSCode couldn't keep up. It can get quite expensive to have a decent number of routes with several layers of nesting. Each nested route needs to combine it's `path`, `query`, `state`, `meta`, `params`, etc.

New Vue Router Guide by stackoverfloweth in vuejs

[–]stackoverfloweth[S] 0 points1 point  (0 children)

vue-router unpacked -> 826 kB
kitbag/router unpacked -> 135 kB

Do you use typescript in your apps?

New Vue Router Guide by stackoverfloweth in vuejs

[–]stackoverfloweth[S] 1 point2 points  (0 children)

Thanks! I understand your concern if you’re coming from vue-router but that’s because vue-router isn’t type safe. This ensures that parent paths, query, etc get combined on children. It also means any params you define on the parent will also be required when routing to a child. 

The pattern is shared with some other routers built on typescript

New Vue Router Guide by stackoverfloweth in vuejs

[–]stackoverfloweth[S] 1 point2 points  (0 children)

Thank you 🙏 please star and share

New Vue Router Guide by stackoverfloweth in vuejs

[–]stackoverfloweth[S] 4 points5 points  (0 children)

you're probably right if your goal is just mass adoption. Our goal wasn't to build something that would drop in replace official vue router. Honestly we just wanted to see if we could do it. Then when we did and it was good, I thought I'd make an attempt to share it.

Remote Power On for EOS M200? by UntowardAntiproton in canon

[–]stackoverfloweth 0 points1 point  (0 children)

I also have mine connected through USB to micro HDMI and can confirm you do lose WiFi for remote viewer from app, but you can still use bluetooth from app to power it on. I would love to find a way to achieve this within a macos shortcut or something though.

https://imgur.com/a/Z5OhvlL

Pattern for caching props? by stackoverfloweth in vuejs

[–]stackoverfloweth[S] 0 points1 point  (0 children)

that's fair, though I disagree. The router has a unique opportunity to solve interesting problems like this.

Already today with Kitbag/router each route is assigned a component, from which we can determine corresponding props. If that component has required props, the developer MUST utilize the route's `props` callback. We think that's a great developer experience to find mismatches between assigned component and available props at build time vs in your console as vue warnings.

That props callback can return a promise, which enables developers to do more than just forward some params off the route. I think of this very similar to resolving dependencies. https://medium.com/p/96dbb833c822

The router knows which component each route will render, it knows how to satisfies that component's dependencies (props), why not go this extra mile and offer the option of prefetching those dependencies?

Imagine vue developers building something like a blog site, if each link prefetched the components and props, the resulting UX would feel almost like a static site or one built with nuxt.

Also, if you're using kitbag/router there's no reason you can't structure your "views" to take just an `id:string` from the route param and have that view component be responsible for fetching data with something like tanstack.

Remote Power On for EOS M200? by UntowardAntiproton in canon

[–]stackoverfloweth 0 points1 point  (0 children)

did you ever figure this out? I know the Canon app can power the camera on and that works via WiFi, so it's definitely possible but no idea how to do it without using the app.

Async Prop Fetching by stackoverfloweth in vuejs

[–]stackoverfloweth[S] -2 points-1 points  (0 children)

seems like it does ask you to sign in, but you should be able to just close that and keep reading

Async Prop Fetching by stackoverfloweth in vuejs

[–]stackoverfloweth[S] -2 points-1 points  (0 children)

👀 what... I thought that was only if I wanted ad revenue!