4 ms·
Thanks for taking some interest in my project. It came from being frustrated with the state of SSGs over the past 10 years. I mostly just make static websites,
by novocantico 2y ago
Thanks for taking some interest in my project. It came from being frustrated with the state of SSGs over the past 10 years. I mostly just make static websites, and I wanted something that was simple and intuitive to me, and JSX seemed like a great fit. But I got very tired of the disproportionately scaled complexity of JSX frameworks like React. Long story short, I made an SSG that just renders JSX as strings. It was natural to extend that to the browser to just render JSX as DOM elements. And in a few cases (mostly layout) it lends well to shared components. Overall I'm happy with what I came up with, although some of it is admittedly a little hacky, and IDE support isn't as good as it could be.
[edit] Oh also, this solution works really well for SEO. That's another problem I didn't find solved well in other JSX frameworks.
- thelastinuit 2y agonot the hero we deserve but the villain we need
- hyperhello 2y agoWhat I’m seeing here is not new. It’s this vanilla pattern but with enough back support to leave off the framing and get the syntax highlighting: Var button = html(’<button>im a button</button>’); The html() function is trivial, but it just doesn’t feel like real programming to do this, even though there’s nothing else to it in the end.
- hyperhello 2y agoDownvote me but tell me why. The example is using .onclick, .textContent, etc in a completely vanilla way. I'm just pointing out you can get all the way vanilla and it still works. What's the issue?
- dangsux 2y ago[dead]
- novocantico 2y agololinder explained it well in here
- hyperhello 2y agoHe did, and he pointed out the point is just IDE support so it has typing and autocomplete and syntax highlighting. Thanks, we agree!
- mock-possum 2y agoTagged template literals for html view templating is what I LOVE about Lit and lit-html. It’s JavaScript you can run natively in browser, no server or pre processor/build step necessary.
- fredmerc 2y agoA JSX for Django server side would be cool.
- WesleyJohnson 2y agoHow would you envision this working?
- megaman821 2y agoNot exactly JSX, but I came across a package django-cotton[https://github.com/wrabit/django-cotton https://github.com/wrabit/django-cotton], that is html syntax first components.
- shepherdjerred 2y agoJust curious, have you seen Astro? I feel like it's the perfect SSG, but maybe you have some reservations that VanillaJSX solves.
- newzisforsukas 2y agoastro is nearly, if not as, "complex" as react, no?
- molszanski 2y agoAs person who has been doing “react” since 2016 I would say that it removes so much of the “react” complex BS that I am surprised it is not x100 times more popular. We’ve recently moved one service from next to Astro and it was just removing a ton of boilerplate and “dance around” code.
- FractalHQ 2y agoThat’s how I felt going from Astro to Sveltekit, but that’s a shorter distance to travel.
- molszanski 2y agoOh, but you are moving out of React. And svelto IMO is waaay friendlier and "sane" than "typical" react. Svelte reactive model (observables and computed) are very friendly and simple to use.
- shepherdjerred 2y agoIt doesn't really make sense to compare React to a static site generator.
- _heimdall 2y agoI'm a big fan of Astro, though I could see it being a bit more of an adjustment for JSX users than Svelte users since Astro's syntax was originally based on Svelte. That said, JSX can be used easily with Astro as long as you get used to at least a bit of The `.astro` syntax for wrapper components and pages/layouts.
- todotask 2y agoLarge WASM payload on your site could be optimized.
- AltruisticGapHN 2y agoHave you looked into lit-html? Coming from Vue I was really surprised it does a lot of what Vue templating does, including attaching events, with just vanilla JS templates. And when you use VSCode lit extension, you get syntax highlighting and full type checking inside the templates. I learned about lit-html after a tweet from Marc Grabanski, where he said he used lit-html with vanillajs, not Lit. After some experimenting I found it works great and it seems like you are trying to solve something very similar. When you use the lit-html template package you can do basically evetything that is described in the Templates chapter https://lit.dev/docs/templates/overview/ https://lit.dev/docs/templates/overview/ ... without all the other abstraction of components that are part of lit-element. https://lit.dev/docs/libraries/standalone-templates/#rendering-lit-html-templates https://lit.dev/docs/libraries/standalone-templates/#renderi...
- dimal 2y agoLove the idea. FYI, on your demo page, the todo app is 404. And you might want to spell out static site generator instead of saying "SSG" on your docs. I didn't know what SSG was, even though I've used static site generators. I had to ask the AI.