jedireza / aqua

:bulb: A website and user system starter
https://jedireza.github.io/aqua/
MIT License
1.38k stars 356 forks source link

"this.state.foo is undefined" #230

Closed HE-is closed 7 years ago

HE-is commented 7 years ago

Sorry to bother again; I can't figure this out. I've been trying to find where I'm going wrong but haven't been able to despite working on this all weekend. I'm just trying to add another set of user info fields. It's initially setting them in the mongodb fine, it's just that the store isn't holding it or something. Maybe something to do with reducers like you mentioned last week. Sorry again for my noobiness; this is a learning experience for me. I attached the client files... client.tar.gz

Thanks heaps!

HE-is commented 7 years ago

server.tar.gz Here's the server code aswell if there's problems in there too...

jedireza commented 7 years ago

You're not supplying enough information for anyone to help. You should provide the stack trace for the error.

And instead of sharing code via zipped files folks have to download (which I've removed), you should create a reproducible example and host it on a GitHub.

This is likely to be caused by not providing default values in your redux stores.

HE-is commented 7 years ago

I'm sorry for my naivety and noobiness. I'm very new to all of this, but am eager to and trying to learn.

How do I provide a stack trace? I figured just posting the client code would be sufficient since it's probably just a simple error. in turn, it wouldn't constitute me posting the whole modified aqua project on my github. I think I'm setting the default values in the initialState constant in reducer, if that's where you set the default values.

Sorry again for my ignorance/noobiness. And thanks for all your help thus far, and creating this awesome project! ^_^

HE-is commented 7 years ago

Okay I've been working on this constantly, skipping lunch, to try and figure this out. What should I do? Should I put the whole project on github to be used as a reproducible example? Sorry to bother; I hope after I learn that I will be able to help and contribute in some way. I just need to get farther than just getting "my feet wet" with a push in the right direction to the deep end.

jedireza commented 7 years ago

How do I provide a stack trace?

I'm glad you asked. 😄 this.state.foo is undefined is the error message, but usually when you see that you see a list of function calls and line numbers, that's the stack trace. That helps us debug what could've caused the issue. You can either find this on the command line for server-side code and in the browser console for client-side code.

https://www.quora.com/Whats-different-between-a-stack-trace-and-an-error-message

jedireza commented 7 years ago

Closing for now. Open a new issue when you have more information.

Thanks for being active with the project. 🙏

HE-is commented 7 years ago

Thanks for giving guidance! I've been learning a ton! I figured it out; I plan to write an overview of my Aqua endeavours and make it into some sort of quickstart guide for noobs like me. Haha.

On Fri, Aug 11, 2017 at 10:28 PM, Reza Akhavan notifications@github.com wrote:

Closed #230 https://github.com/jedireza/aqua/issues/230.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jedireza/aqua/issues/230#event-1203497238, or mute the thread https://github.com/notifications/unsubscribe-auth/ASfkzwkcDVamK7DB55OmzXFB24SEGQNtks5sXRvLgaJpZM4Ovlbu .