Re:If TypeScript is so great, how come all notable ReactJS p...
by Touche on Tuesday September 20, 2016 @09:07AM
(#12539196)
I can't find in the documentation, does the `pub build` tool do code splitting? I can't use a language without this.
[ Parent
| on HN ]
Re:If TypeScript is so great, how come all notable ReactJS p...
by markdog12 on Tuesday September 20, 2016 @09:23AM
(#12539285)
Sorry for my ignorance, but does that amount to loading a library on demand? If so, yes, Dart can do this:
import 'package:deferred/hello.dart' deferred as hello;
// When you need the library, invoke loadLibrary() using the library’s identifier.
greet() async {
await hello.loadLibrary();
hello.printGreeting();
}
Re:If TypeScript is so great, how come all notable ReactJS p...
by wstrange on Tuesday September 20, 2016 @02:36PM
(#12542027)
Also worth pointing out that Dart can do tree shaking at compile time, to eliminate library code that is never called