News for hackers. Stuff that matters.
Re:Show HN: JSX-Htmx that doesn't conflict with react by cranberryturkey on Friday April 12, 2024 @08:24PM (#40019103)
you misunderstand what primatejs is
Re:Show HN: JSX-Htmx that doesn't conflict with react by mrinc on Saturday April 13, 2024 @07:55AM (#40022516)
I misunderstand yet you provide no further information on my supposed misunderstanding... -_- thanks

From reading the docs:

All code for an HTMX app would be in a view - a .htmx file.

The .htmx file is then rendered as a templated view.

1) The files are .htmx ... they are not Typesafe.

2) I am forced to use a the webserver and formatting (files/dirs/paths) provided by primatejs.

3) The htmx files are not written in JSX - so typesafety is completely lost - it is the same as using any other templating engine at this point - as per their docs: "Client side templates to be used by the client-side-templates extension. Possible values: "handlebars", "mustache" and "nunjucks". Make sure you add "client-side-templates" to the extensions array option."

So you write the code using a template renderer, I have been there done that.

It works but you lose all type safety

The lack of type-safety was the whole reason I did this.