Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Vue Router ? #13

Closed
Xsmael opened this issue Aug 22, 2023 · 6 comments
Closed

Add Vue Router ? #13

Xsmael opened this issue Aug 22, 2023 · 6 comments

Comments

@Xsmael
Copy link

Xsmael commented Aug 22, 2023

This is a nice boilerplate, i'm wondering why you didn't add vue router, that would be a perfect combo!

NWJS + Vite + Vue + Pinia + Router + Vitest

@ayushmanchhabra
Copy link

ayushmanchhabra commented Aug 22, 2023

IMHO putting a router might restrict an NW.js application. What if you want multiple windows? Would you have a router with multiple routes for every window? (Question applies to all web frameworks tbh)

@TheJaredWilcurt
Copy link
Member

TheJaredWilcurt commented Aug 23, 2023

I think I'll add it in. A router is just associating what component to display based on a URL. So even if you opened a new window, it could still benefit from that system, like:

Clicking around in either window would update the URL and swap out the component being used.

Since the URL's won't be visible to the user or something you could externally link to, routers aren't really needed in desktop apps. However, their approach to organizing views is still a good mental model and one people would be used to, so would still be helpful to have already set up.

@Xsmael
Copy link
Author

Xsmael commented Aug 23, 2023

I think I'll add it in. A router is just associating what component to display based on a URL. So even if you opened a new window, it could still benefit from that system, like:

Clicking around in either window would update the URL and swap out the component being used.

Since the URL's won't be visible to the user or something you could externally link to, routers aren't really needed in desktop apps. However, their approach to organizing views is still a good mental model and one people would be used to, so would still be helpful to have already set up.

Exactly what I was thinking! Thanks!

@ayushmanchhabra I get your point, obviously in some cases, it wont be very usefull, but i think there are other good enough reasons to add routing to this boiler plate

@TheJaredWilcurt
Copy link
Member

Didn't even realize this until halfway through, but duh, this boilerplate builds for the web also. So yes, you absolutely would use the URL's in the web build of your app.

@Xsmael Can you try out the vue-router branch (#15). And see if there is anything else to add to it.

I still need to fix up the tests before it can be merged.

@TheJaredWilcurt
Copy link
Member

Fixed the test, gonna merge/release.

@Xsmael
Copy link
Author

Xsmael commented Oct 22, 2023

Didn't even realize this until halfway through, but duh, this boilerplate builds for the web also. So yes, you absolutely would use the URL's in the web build of your app.

@Xsmael Can you try out the vue-router branch (#15). And see if there is anything else to add to it.

I still need to fix up the tests before it can be merged.

It's all good sorry for the delay ^^' i think i'm multitasking too much! I had installed the router and went on with the project, so i didn't check back your reply. Thanks for the nice work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants