150 karma · joined Nov 17, 2016 (10y ago) · 29 submissions
comment 8y ago · link · parent
comment 8y ago · link · parent
Context provides a way to pass data through the component tree without having to pass props down manually at every level. https://reactjs.org/docs/context.html
>> single source of truth
Often, several components need to reflect the same changing data. We recommend lifting the shared state up to their closest common ancestor. https://reactjs.org/docs/lifting-state-up.html
comment 8y ago · link · parent
comment 8y ago · link · parent
comment 8y ago · link · parent
When you do things like drag & drop and interactive resize you have to query DOM to get position and sizes, and perform hit detection, and you have to manipulate DOM directly. jQuery is very convenient for these kinds of things.
6.
Doctor falsely accused, career destroyed by Google(cnn.com ↗)
6 points · by krishanath · 8y ago · 2 comments
comment 8y ago · link · parent
Even if you increase taxes to 40% (in reality even in CA the effective tax rate as opposed to marginal is not that high) and increase expenses to $7K per month (excluding housing), the final net worth still falls in the range I estimated, i.e., north of $7 Million.
Any Facebook or Google engineer reading this, how much do you expect to have when you retire?
10.
Ask HN: Net worth of software engineer at retirement?
22 points · by krishanath · 8y ago · 23 comments
comment 8y ago · link · parent
12.
Ask HN: How do Google's iOS apps track your identity even after reinstalling?
45 points · by krishanath · 8y ago · 21 comments
comment 9y ago · link · parent
comment 9y ago · link · parent
Disagree. There is no reason to believe MVC tends towards spaghetti in large codebases. Controllers and views implement a small portion of the application's functionality. When the applications get larger individual controllers and views do not even know that the application got larger, so this scales very well.
comment 9y ago · link · parent
comment 9y ago · link · parent
Which it is, actually!
Think about how MVC works in iOS, or ASP.NET MVC or JSP Model 2, etc. In the case of the latter two, your state is stored in the session as simple, regular objects. Have you felt the need for actions and reducers and immutability etc. when using session state? I have not.
When programming JavaScript SPA, you can program in the style of MVC also. There is no need for actions, reducers and so on, unless your app is for example a word processor and you need undo/redo (as mentioned by another comment on this thread.) Most of the time you are getting data from the backend, temporarily storing stuff in memory, modifying it and sending it back to the backend. There is no need for actions/reducers and such other nonsense for that.
When I mention this someone always points me to the "you may not need redux" article by the creator of redux, in an attempt to legitimize some use cases of redux. There may indeed be some legitimate uses cases for redux. But it has become the de facto standard way of building React applications, and that's totally unjustified.
comment 9y ago · link · parent
Luxottica retail brands: http://www.luxottica.com/en/retail-brands
Luxottica eyewear brands: http://www.luxottica.com/en/eyewear-brands
Luxottica vision insurance: http://www.luxottica.com/en/node/6336
See 60 Minutes story on Luxottica: https://www.youtube.com/watch?v=gDdq2rIqAlM
comment 9y ago · link · parent
comment 9y ago · link · parent
comment 9y ago · link · parent
comment 9y ago · link · parent