Closed bebraw closed 3 years ago
@bebraw awesome! Exactly what is missing to build something more serious. @nicojs are you interested in merging this?
@marcj This might need more work and tuning but it's definitely worth a look.
One question is, should we simply drop the old syntax where contents are passed as the second parameter and go straight with React-style for children
?
Another question is, should we support React-style fragments as well? My understanding is that this should be fairly simple (another field in configuration).
I see my editor applied some formatting changes to the code. I can revert those if you prefer. I guess ideally we would have Prettier set up in the project as that would solve these kind of problems.
Yeah, planning to do that. You're forgiven for now 😉
EDIT: Ahh man. Four space indent? What was I thinking? 🙄
@bebraw If you ask me, then yes and yes. :) But it's of course up to @nicojs. I'd love to integrate this lib into a new server framework that would use this as template engine, so the more features it has that are required for "serious" apps, the better. 😅
Oh nevermind, I just saw this does not have a OSS license. @nicojs do you plan to make this OSS?
Yes, should have Apache-2. PRs welcome :)
@nicojs I did the changes (sorry for the delay 😄 ).
I would probably drop the old way of handling children
altogether and go with React-style as that's kind of standard but that's up to you.
Any thoughts on this? Should we finish up the PR?
After using typed-html a while at tailwind-webpack-starter, I started missing React-style
children
as that would simplify some of the code and make it feel more familiar.I see my editor applied some formatting changes to the code. I can revert those if you prefer. I guess ideally we would have Prettier set up in the project as that would solve these kind of problems.