The thing I hate most about writing React components is how much of the correctness is down to the code patterns you use. So many places to shoot yourself in the foot. Do other "view libraries" do better?
-
-
Disagree, correctness has a well-defined meaning for any type of app. Anyway I don’t understand what a ‘performance app’ is; are there some apps that we don’t want to be performance apps? Re componentWillReceiveProps, that too can be typed so that you force it to return a state.
-
I think the difference is you're talking about an app being "correct" and Sebastian is talking about making an app "correctly." Making an app correctly - in that it meets the requirements of the business - does involve having certain performance characteristics.
- 5 more replies
New conversation -
-
-
Much of the complexity comes from trying to be “correct” when “correct” is always changing. Simpler to use the few patterns here https://reactjs.org/docs/thinking-in-react.html … and forget the rest. If u don’t want to clear state from derived props don’t set state from props.
-
But there are some components that are difficult to implement without having state be derived from props. Imagine a light switch counter with prop on:bool, that also displays number of time it has transitioned to “on”.
- 1 more reply
New conversation -
-
-
Some performance tradeoffs must be made by the app developer, and we should educate people on them. Everything else should be verifiable by a type system, and as
@jordwalke mentioned, frameworks like React can define the types that are needed to safely render views, etc.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 