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

Poor typescript examples #470

Open
Pacheco95 opened this issue Dec 18, 2020 · 6 comments
Open

Poor typescript examples #470

Pacheco95 opened this issue Dec 18, 2020 · 6 comments
Labels
feature request Feature request help wanted Extra attention is needed

Comments

@Pacheco95
Copy link

I'm trying to learn how to do vuex things in a typescript way, but having too much pain to find useful guides and examples.
The examples provided in https://github.com/nuxt/typescript/tree/master/examples is too poor and not useful.
Can you make some effort to improve the examples with real world usage?

The best guide I have found was this article https://blog.logrocket.com/how-to-set-up-and-code-nuxt-js-apps-fully-in-typescript/

@Pacheco95 Pacheco95 added the feature request Feature request label Dec 18, 2020
Copy link
Member

Atinux commented Dec 18, 2020

Thank you for your feedback @Pacheco95

If you have a better example, feel free to open a pull request, contributions and new contributors are welcome 😊

@Atinux Atinux added the help wanted Extra attention is needed label Dec 18, 2020 — with Volta.net
@Geminii
Copy link
Contributor

Geminii commented Dec 27, 2020

Hi @Pacheco95
I want to add this example (https://codesandbox.io/s/nuxt-eshop-ts-vg6lg) into the documentation.
What do you think ?
Feedbacks are welcome @Atinux @danielroe ❤️

@Pacheco95
Copy link
Author

Hi @Pacheco95
I want to add this example (https://codesandbox.io/s/nuxt-eshop-ts-vg6lg) into the documentation.
What do you think ?
Feedbacks are welcome @Atinux @danielroe ❤️

I'll check it out!

@Pacheco95
Copy link
Author

@Geminii it is a very good example. Will be nice to start a PR with it.

@raphaelarias
Copy link

I'm not an expert with Nuxt and Typescript, and in my opinion guide, examples, and explanation of using Vuex with Nuxt and Typescript are just very very very confusing and disconnected. I dread the fact I tried in the first place. Not sure if after two years since this issue was open, other developers faced the same issues, but I did.

If there's anything I can do to help, please let me know, so far it was just a world of pain.

@danielroe
Copy link
Member

The tricky piece is that vuex wasn't built with typing in mind. You can use Pinia (or if you need to stay with vuex, feel free to try my own project https://typed-vuex.roe.dev/ which was created to address this issue in a different way).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Feature request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants