Add support for JSX
- Issue Type: Feature Request
Requested by CookieOfFortune on Reddit
He would like to be able to use a JSX syntax instead of the over_react fluent interface.
Here's a link to how TypeScript supports JSX
Seems like this would possibly be something that would require some dartlang sdk changes, but I'd defer to @greglittlefield-wf's opinion on that.
Either way - until we get more than one person asking about it, this is likely icebox.
FYI: @greglittlefield-wf @aaronlademann-wf @jacehensley-wf @clairesarsam-wf @joelleibow-wf
Looks like there's the ability to create analyzer plugins? See https://github.com/dart-lang/angular2-dart-analyzer. It's not really documented though.
Something like that would probably be our best bet.
That plus Bazel would be really interesting.
I think this can be pretty easily solved by writing a transformer, which rewrites the XML code to dart code just before compiling, no? Would definitely be very nice to have.
@dotdotcommadot That would definitely be possible, but then there'd be no analyzer support when authoring the JSX.
At that point, is writing JSX really favorable to the over_react syntax, which can be statically analyzed?
AngularDart runs a check on every 'save' action, so I think this might do the same, no? But perhaps it won't be that easy to implement anymore since you have to generate sourcemaps and stuff (to throws errors with the matching line numbers in your files etc)
However, even with or without static analysis, I think this would be an awesome feature.
Found my way over here when looking into Dart again after a year-long stint in the React world. I spent the year before using Dart, loved it, then had to pick up React for a new job. I still prefer Dart over vanilla JS... language-to-language. But JSX is honestly the best part about React for being able to visualize structure and staying out of an HTML document. IMHO it'd be worth writing a transformer for.