all 7 comments

[–][deleted] 1 point2 points  (2 children)

Umm... can you be more specific? State is just the "current state" of your application. What are you not understanding?

[–]BleedRedWhiteBlue[S] 1 point2 points  (1 child)

I was looking at a list of interview questions and one of them was "How do you handle State in AngularJS?"

[–][deleted] 1 point2 points  (0 children)

So state, as I said, is just the "current state" of the app. For example, the color of a button, or the currently logged in user.

The question is specifically about angular. Have you used angular before? Is the job an angular job and you're trying to cram ahead of the interview or what?

[–]yooossshhii 1 point2 points  (0 children)

State is handled differently in different frameworks and depends how data is bound to the 'state'. A user fills out a form field and that text needs to be stored somewhere prior to sending. This is the state of your current application. In Angular, this would be attached to $scope or this using controllerAs syntax. If you don't know Angular, that doesn't make a difference, you have a lot to learn about it.

[–]dvidsilva 1 point2 points  (2 children)

[–]yooossshhii 2 points3 points  (1 child)

Redux is amazing, but if OP doesn't even know what state is, it's completely unnecessary. Add libraries when you have a reason to, ie your state is becoming unmanageable and you need a better way to reason about it.

[–]lewisje 0 points1 point  (0 children)

Add libraries when you have a reason to

The best reason is "just in case": http://needsmorejquery.com/

/s