Flutter is not React
flutter.thosakwe.com
flutter.thosakwe.com
But it's common these days to confuse reader to make self promotion for their tech/services
A huge amount article's on Medium are similar to this one, they stay at the surface and don't really bring anything new to table.
EDIT: I'm not so sure as to what you mean by "staying at the surface," though - I included examples of patterns that are common in React, their analogues in Flutter, and the reasons why said patterns may or may not apply well in Flutter.
Sounds like the writer hasn't too much experience, so be kind :)
FWIW I’ve found the most prosuctive front-end combination to be React + Typescript, which has the benefit of being seamlessly interoperable with JavaScript, really excellent at capturing common errors, and allowing the type system to be exploited for much more expressive code. YMMV of course.
Is TypeScript better in that regard?
Sounds like an editor issue. Have you tried it with something like IDEA/WebStorm where there's a bit more code intelligence?
Inheritance has it's place in the toolbox.
They don't seem to know how JSX works, tell us what Flutter wont be instead of what it could be. I am truly sorry for their fatal decisions in this aspect.
I too would appreciate a naming convention; that would make things a lot easier.
With Dart 2 syntax making new optional, widget layout is quite compact and easily readable. I think the Flutter team has made the right call here. Sticking with pure Dart has a lot of advantages (tooling, IDE support, etc.)
IMO the benefits of something like JSX really don’t make as much sense in Flutter. For me, the main thing is, why use XML syntax to represent something that’s truly not XML at all?
const FrogColor({
Key key,
@required this.color,
@required Widget child,
}) : assert(color != null),
assert(child != null),
super(key: key, child: child);
final Color color;I personally found typescript almost impossible to use until turning on the non-nullable by default option and no implicit any (and really started liking it after). I see dart had “no implicit dynamic” — is that widely used in dart? I would turn that on with a quickness ...
Reliable constraints were really important for me to figure out how to use the the optional typing model of typescript to my benefit. Maybe Dart’s programming model is simpler since it doesn’t maintain JavaScript compatibility... but my suspicion is that features like implicit-dynamic and nullable types will just make it harder to learn how to interpret compiler errors and harder to learn how to write good code in the language...
We have over 20 very complex projects built in react with no flux. The whole state is managed by react itself and some helpful decorators. You could just easily not use flux/redux - the article should not mention it.
Could you elaborate a bit on what those decorators you mentioned are?
I cannot enumerate all decorators in this comment but we have one called useGlobalState where you pass several prop names and a scope name and in return it manages those props for your like any other controlled component. It is fast and it is effective in what it does.
There are a few others that are more specific.
I’m quite attached to stateless functional components too.