Backticks
I know, I am nick-picking. But I feel like they add unnecessary noise. And also ${}. :(
JSX
One reason I love JSX is due to its simplicity. I'm using psuedo-HTML but feels right. I like its simplicity and elegance. It's much less noisy than adding ng-* for sure. JSX is the reason why I enjoyed playing around with React far more than Angular.
Not a big deal? In small projects, it's not. But when you have a huge code base maintained by multiple devs, code readability (and simplicity) is king.
I like TypeScript very much, but I have the feeling that FB will push Flow or ReasonML much harder in the future, so I don't know if TS(X) can guarantee the same dev experience in the future, especially for things like React-Native.
On the other hand is MS embracing RN with ReactXP, so who knows :D
The backticks and ${} syntax are natively part of ES2015, defined as 'template literals'. t7 uses these so that you don't need to use an additional preprocessor/transpiler
It's highly recommended that the t7-precompiler is used when deploying to a production environment. The precompiler will greatly reduce memory usage, startup speeds and template compile times.
This is really neat! Lately I've been looking for an example of a "partial" parser (parser that is aware of "holes" such as template interpolations or a user's cursor in an input field) and this is a great one π
Small note, I think there's an interaction between the template string syntax and the dev.to markdown parser affecting the style attributes in your post:
Top comments (12)
Hmmm...interesting. This looks rather promising.
Some observations:
Backticks
I know, I am nick-picking. But I feel like they add unnecessary noise. And also
${}
. :(JSX
One reason I love JSX is due to its simplicity. I'm using psuedo-HTML but feels right. I like its simplicity and elegance. It's much less noisy than adding ng-* for sure. JSX is the reason why I enjoyed playing around with React far more than Angular.
Not a big deal? In small projects, it's not. But when you have a huge code base maintained by multiple devs, code readability (and simplicity) is king.
TSX
I'd love to know your opinion on TSX :)
I totally agree with your comment about JSX and its simplicity and the unnecessary noise that the t7 syntax would add affecting the readability :)
Although it's always nice to have options I think I'll stick with JSX for now
I use t7 only for some POCs where stuff runs in-browser.
React Hpyerscript Helpers are also a nice alternative, with less visual clutter.
I like TypeScript very much, but I have the feeling that FB will push Flow or ReasonML much harder in the future, so I don't know if TS(X) can guarantee the same dev experience in the future, especially for things like React-Native.
On the other hand is MS embracing RN with ReactXP, so who knows :D
The backticks and ${} syntax are natively part of ES2015, defined as 'template literals'. t7 uses these so that you don't need to use an additional preprocessor/transpiler
Ah, now that makes sense.
I suppose it's a trade off at end of day. Thanks Marco for your clarification.
This is really cool! I have a few questions for you:
React.createElement
, being able to pass in Preact'sh
?I'm a huge fan of this! :)
Performance looks like it might have issues:
But I would really like to see this measured to know if it's a problem in practice.
I also read HTM, an alternative to t7, has that recommendation from its creators.
Can you post a link please?
Sure
github.com/developit/htm
This is really neat! Lately I've been looking for an example of a "partial" parser (parser that is aware of "holes" such as template interpolations or a user's cursor in an input field) and this is a great one π
Small note, I think there's an interaction between the template string syntax and the dev.to markdown parser affecting the
style
attributes in your post: