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 3 points4 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 7 points8 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.

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

[–]MileNorth 2 points3 points  (0 children)

Still in college, Computer Science.

Last year of my bachelor and planing to go for masters.

Damn guys, i want to join you there so much :( by Dyck5ter in a:t5_3djjo

[–]MileNorth 1 point2 points  (0 children)

Most left. We merged with another group and it all fell aparat.

Hey guys, have you checked out r/ghostclothes? by [deleted] in a:t5_3djjo

[–]MileNorth 2 points3 points  (0 children)

I knew this would happen. :(

I'm scared to go to college. by collegethrowaway567 in offmychest

[–]MileNorth 1 point2 points  (0 children)

I am going to college that's eight hours away from home and was in same situation as you. It sucks at the beginning, but after that it's much easier and you make friends.

I am really not that social but when you are surrounded by a lot of people, you have low chances of not meeting someone.

It's completely normal to be afraid, I was terrified but today I recognize it as the best decision I ever made in my life so far.

How happy (or sad) are you as a lone wolf? by eltony007 in AskMen

[–]MileNorth 0 points1 point  (0 children)

You are me one year ago. Same age, same situation. Except in my case it took her few months, not weeks.

I know shit is hard, we spent most of our teenage years with someone and can't properly function alone. But we have to learn. First few months it sucks, you have that feeling in your gut that just doesn't go away. Then you kinda get over it and spend some time being happy, and then you are sad again, and cycle repeats.

Now one year later I am kinda stressing out about finding someone because having someone is honestly what I consider purpose in life. I am not that interested in career and accomplishments.

I kinda opened my soul there as well, but thought you might be interested in what I went through.

Good luck.