I'm the author of ScriptUI. I whipped it up over the last few weekends as a proof of concept. I'm looking for feedback on whether you'd use something like this. I hope it helps make starting projects easier.
One thing that JSX gives us is named properties. I see this being useful if you are only passing a few props but as soon as you pass more than a few you’d have a confusing looking list of Paramus passed to a function.
That's a great point! Thanks for checking it out. I like to think there's still room for this through the use of an object literal or by leveraging modifiers.
Good question! Thanks for checking this out. I don’t have a bunch of examples but I see how that could be helpful.
The friction is in the required tooling to use JSX. Node, npm, Babel. Without that tooling, you can use React.createElement. But that’s too long so you’ll need some alias. const h = React.createElement but this gets noisy because your element type, props, and children are all jammed into a single function call. So the abstraction is meant to break up the component definition more cleanly. This is inspired by how SwiftUI defines UI.
1
u/[deleted] Jul 28 '19
Hi /r/reactjs!
I'm the author of ScriptUI. I whipped it up over the last few weekends as a proof of concept. I'm looking for feedback on whether you'd use something like this. I hope it helps make starting projects easier.
Thanks for reading!