9,867 karma · joined Aug 20, 2015 (11y ago) · 5,528 submissions
comment 1y ago · link · parent
Also I wouldn't run suspicious third-party binary installer anyway. If it is not in the official repositories, it doesn't get installed, because I have no time to figure out if it is a safe software or not, what it will do to my system, does it include telemetry, and I have no time to build a sandbox.
comment 1y ago · link · parent
Also what I hate about SVG is that it requires a whole browser to display because it can contain CSS and JS.
Both these facts hint that it was designed only for embedding into websites, and is not ready for standalone use. Maybe we need a new format for vector graphics that doesn't require a browser.
comment 1y ago · link · parent
This works only with immutable data structures. Am I wrong? Because a modified array will pass the identity test (=== operator). If you are using mutable data structures, you cannot use identity operator to detect changes.
Also if "memo" optimization is that good why does one have to add it manually?
> If your react app is re-calculating the entire tree, you suck at react
The point of UI framework is to do the optimization for me and not require me to use some special style of coding like immutable structures or manually write functions like componentShouldUpdate. What I write is how UI variables depend on model variables and the rest is framework's job. I don't want to use weird patterns like a function with a giant switch that processes update events and clones the whole model graph to change a single variable.
Vue of course has its own set of issues, caused by using proxies (for example when adding on object to the set you must "unwrap" it manually to prevent adding a proxy to the set).
comment 1y ago · link · parent
> If your whole tree is recalculating on every mousemove event
If you update a variable in the root component, that will happen. Am I wrong?
comment 1y ago · link · parent
So React won't cause performance issues only if you have few model variables or manually optimize the code by using immutable data structures (which have their own performance issues) and pure components.
For comparison, Vue detects changing by wrapping all model variables with proxies and linking them to UI components that use them. This has an advantage of not having to recalculate everything and disadvantage of having an overhead for using proxies and creating a dependency graph. Also, having to deal with proxies adds more pain for the programmer.