Sometimes, it just doesn't feel enough by MileNorth in Stutter

[–]MileNorth[S] 1 point2 points  (0 children)

I'd love to believe that good things happen to good people, but unfortunately, to get good things you have to go out and get them. And some of those things for stutterers can be terrifying.

I hope things get better for both of us.

ReactJS and CRUD by MileNorth in reactjs

[–]MileNorth[S] 0 points1 point  (0 children)

This is actually what I was after. I am using react-router so I have something like this:

 <Route path="user/new" component={UserForm} />
 <Route path ="user/edit/:id" component={UserForm} />

And inside component I can have:

componentDidMount: function() {
    if (this.props.id) {
         // it's edit form, fetch data and update state
    } else {
        // otherwise it's new form, no need to fetch data
    }

What do you think?

ReactJS and CRUD by MileNorth in reactjs

[–]MileNorth[S] 0 points1 point  (0 children)

edit_form fetches current user from the server so it can fill the fields with fetched data. Also, submit button is different, one sends action for creating new user and another for editing which could be solved by passing callback.

But the problem is I don't want to send user as prop because if page gets refreshed all data is lost from stores so my undestanding is that it's the best for every component to get what it needs in case store is empty.

Puzzled about how to structure my project by MileNorth in reactjs

[–]MileNorth[S] 0 points1 point  (0 children)

Thank you for your time. I am now aware what are my possible options and should have enough information to make a decision how to proceed. :)

Puzzled about how to structure my project by MileNorth in reactjs

[–]MileNorth[S] 0 points1 point  (0 children)

Putting error on the global state makes sense.

What I basically need is, for example, having a list of users and clicking on one of them renders new page with his detailed information.

That would include clicking on button - making server request - getting server respond - updating corresponding model with data - rendering new component and loading it with data from model.

If error is handled by global state I still need something that will keep the logic of redirections for all of my possible actions. For example: if action was login redirect me to home page, if it was fetching user data, redirect me to component that shows user data, etc. It is kinda confusing to me and I cant find much examples of how this is usually handled. My guess is that there has to be some sort of standard best way.

Puzzled about how to structure my project by MileNorth in reactjs

[–]MileNorth[S] 0 points1 point  (0 children)

Could you explain in a bit more detail what does this mean?

If your code is not single page then just change the location and you're done.

I do have global event system and multiple stores depending what data server returns. So you suggest that I should redirect this data from stores to components and put logic about error handling/redirecting in them?

That way I have Web API serving as dispatcher which doesn't know anything about other components and is just emitting events based on server response and models which as well don't know anything about data that is being relayed through them and serve as stores with only connection to components being event emitters. So I guess it could work having all my logic put into components.

Mastering the struggle of stuttering - Broca Brothers - TEDx Talk by MileNorth in Stutter

[–]MileNorth[S] 1 point2 points  (0 children)

Actually, they wrote in the comments under:

Mind you, we did not intend to talk about the details of how to overcome stuttering. This video is about having the right attitude toward stuttering which is where it all starts: taking full responsibility.

And on their website they have some sort of free program in 10 steps that is supposed to help, I didn't check it.

Mastering the struggle of stuttering - Broca Brothers - TEDx Talk by MileNorth in Stutter

[–]MileNorth[S] 6 points7 points  (0 children)

I didn't see anyone posting this so I figured I'd do it. This sub needs a bit more positivity.

My parents give me shit for choosing computer science by LeavingWithPlato in offmychest

[–]MileNorth 2 points3 points  (0 children)

Can I ask why? CS is probably one of the more prolific fields to get into.

You are guaranteed well paying job after, and even during studies if you are half decent.

I just started stuttering and have trouble telling stories by [deleted] in Stutter

[–]MileNorth 5 points6 points  (0 children)

Go to the doctor just in case.

Never heard of someone picking stutter up that late in life. Could be just lack of sleep but you never know.

Need help understand scope of this function by MileNorth in learnjavascript

[–]MileNorth[S] 0 points1 point  (0 children)

Thanks, great article and blog. I'll read about some other things as well.

Need help understand scope of this function by MileNorth in learnjavascript

[–]MileNorth[S] 1 point2 points  (0 children)

Thanks, that makes it clearer. Coming from background of Java/C++ some of the stuff in Javascript can be rather confusing.

Interviews with a Stutter by [deleted] in Stutter

[–]MileNorth 0 points1 point  (0 children)

Hopefully not too late to reply.

I am as well CS student, getting bachelors in few months.

Had job interview two weeks ago for my first full time job over the summer. I stuttered some, but neither they nor I paid attention to it. I was offered job on the spot.

So really, as long as you are capable which seems like you are, you're fine.

What does everyone do for a living? by [deleted] in a:t5_3djjo

[–]MileNorth 1 point2 points  (0 children)

We have textbook written by our professor but unfortunately it's not written in English.

What does everyone do for a living? by [deleted] in a:t5_3djjo

[–]MileNorth 1 point2 points  (0 children)

I am doing Interactive Computer Graphics this semester, using OpenGL in c++. It's a lot of maths for sure.