jedireza/aqua

"this.state.foo is undefined"

HE-is opened this issue ยท 7 comments

HE-is commented

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

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

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

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

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.

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

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

Thanks for being active with the project. ๐Ÿ™

HE-is commented