If a frog is put suddenly into boiling water, it will jump out, but if the frog is put in tepid water which is then brought to a boil slowly, it will not perceive the danger and will be cooked to death. So today you don't see a major problem. Even though every single purchase you made in your entire life is being logged in a central database that's out of your control. OK. You are slowly being brought to a boil, and you're not perceiving the danger.
HN user
krishanath
> state passed around as props
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
What is it about React, that needs you to use a state management library? I have programmed in Servlets, JSP Model 2, ASP.NET, iOS, Android, Windows. None of these require a state management library. But React developers seem to think a state management library is a must-have. Is this a cultural thing? Is it due to some limitation of React?
There are tiny alternatives to React that support JSX syntax. This library is better when you want to be "closer to the metal": https://github.com/wisercoder/uibuilder
jQuery is a library of shortcuts. Everything you can do using jQuery you can do without jQuery, but that's like saying everything you can do in Excel you can do with just a Calculator app. Yes, it is possible, but why would you want to?
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.
I noticed many people have found flaws in my assumptions and estimates, but nobody wants to post an alternative estimate?
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?
If you buy a house that's an investment, not an expenditure, so it is not included in monthly expenses. 45% is your marginal tax rate, not effective tax rate.
S&P 500 actually returned 10% between 1988 and 2018. If you invested $10K in S&P 500 in 1988 it would be worth $205K today. If you use a compound interest calculator you can see this corresponds to 10% growth per year.
Here's something few people know: Sun saw Telescript as a threat (because Sun was all about "the network is the computer" and now Telescript was invading this space) and started the Java project in response. Microsoft saw General Magic's social interface and deemed it to be a threat to Windows. Their response was "Microsoft Bob".
> React has nothing to do with styles
That's one of its limitations.
React is a component technology and doesn't solve the problem of clashing styles, element ids and so on. Web components is a component technology that does.
Not a major framework, but UIBuilder lets you use Web Components using JSX, just like React:
I hope you're fine with the same thing happening to you when someone finds your views repugnant.
This doesn't randomly happen to everyone.
Here's an expression parser, written in C#, that also has the ability to execute the parse tree:
One problem not covered by this story: it takes too many years to acquire a medical degree. In India, you can go to medical college right after graduating from high school. It only takes 5 years in the medical school to become a doctor. By age 22 you are a doctor. Compare that to the US: you have to get degree from a 4-year college before going to medical school. This is wasteful, unnecessary, and increases the cost of medical education, which in turn increases cost of medical care.
> MVC is easy for small apps but has a tendency towards spaghetti in larger codebases.
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.
That's because you used React Router, which makes the router a view component. Router should be independent of view technology. If you had used React in the MVC style you would not have had to use Redux. Think about how session state works in the case of server-side applications. The same can be done on the client side too, by using React with an MVC framework.
> it appears hugely over complex and unnecessary
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.
The reason eye glasses cost so much is the multiple monopolies of Luxottica. Luxottica owns: (1) nearly all brand name frames including Ray-Ban, Oakley, Prada eyewear, Armani eyewear and so on, (2) nearly all retail stores such as LensCrafters, Pearle Vision, Sears Optical and Target Optical and (3) EyeMed, one of the largest vision insurance companies.
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
Sorry, to me that's an unsatisfying answer. You are not saying what problem redux is solving for you. "It is like functional programming" does not even attempt to explain what the problem being solved is.
No, if you get/set methods that doesn't imply javascript with jquery! I am using React, but not ReactRouter or Redux. I hold my application state in a tree, and the tree nodes have get/set methods. My state tree is not immutable. I think "immutable way of changing state" is an oxymoron.
Holding application state in a tree is nothing new. It is as old as software development itself. You don't need Redux for that. Actions and reducers are not solving any problems. If your application needs undo/redo then that's understandable otherwise get/set methods are all you need.
So what is the problem solved by Redux? I don't see a simple explanation of that in your write up. Most people struggle when asked this question. Some people go on about "time travel" and other fancy things that have nothing to do with the business problem you're trying to solve. Other people talk about "single source of truth" as if that didn't exist before Redux.
Again, the government should not collect citizen's personal information and make it "public" information. Even when certain information is known about a private citizen, there should be laws governing what is allowed use of that information and what isn't. Certain uses should require a release from that citizen.
The government should not put citizen's personal information in the "public domain". When government collects personal information about its citizens there should be laws governing what is allowed use and what isn't.
Sure, but we need new laws on how public information can be used. Just because you want to register to vote shouldn't mean your date of birth can now be made freely available to identity thieves and potential employers who can use the info to discriminate against you.