Closed JLHill84 closed 4 years ago
Thank you for the nice words, and I am not surprised there might be small syntax bugs as I proof read the book all the time and make corrections as I receive feedback. Could you create add the non working code to your https://github.com/JLHill84/vue-with-ts repo? That would be the easiest way for me to help.
Just pushed my current code to the repo.
Ok the simple mistake is in the src/store/index.ts file, line 42:
Since fetchItems returns a promise, we need to use it with fetchItems().then((data: any) etc (or if you prefer you could start using async/await)
I'll review the book and see where I made that mistake. Sometime the editor I am using messes up the format of the code samples and I manually fix them within the editor without validating the changes in VSCode so that was my fault. My I am happy you reported this so I can fix it.
Do not hesitate to ask for more help if you get stuck, I'll try to always get to it as soon as you can, usually within 1-2 days max.
That did the trick, thank you! I really appreciate the quick response. Time for Ch.7.
First, thanks for taking the time to write this! I'm early in my career and this is exactly the kind of thing I was looking for to help me improve. I even appreciate some of the small bugs I've come across working through the code provided in the PDF, as they've helped me better understand what I'm building by having to debug. That said, I'm stuck on Chapter 6. I went back through the code several times now and I can't seem to find my problem. My console.logs all fire as expected right up until the apiClient.items.fetchItems() call in src/store/index.ts, which does nothing. No error in the console and the green ball just bounces on. I know that's pretty vague, my apologies. I've looked at the repo code and I know that what's in the PDF isn't quite current in all cases, so what I'd really like is suggestions for how I can better approach debugging this if possible. Thanks again, I'm really learning a ton.