typescript
typescript copied to clipboard
Poor typescript examples
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/
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 :blush:
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 ❤️
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!
@Geminii it is a very good example. Will be nice to start a PR with it.
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.
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).