JS

JSX-Htmx that doesn't conflict with react

Hacker News

JSX-Htmx that doesn't conflict with react

Hey folks, I've been tinkering with a TypeScript/JSX library that might interest some of you: jsx-htmx. HTMX has been gaining traction lately for its simplicity and performance benefits in handling dynamic HTML content. However, as someone who values type safety and enjoys working with TypeScript, I found the existing options for integrating HTMX with TSX files to conflict with what I wanted to achieve. So, I decided to roll up my sleeves and create jsx-htmx. With just a single line (`/* @jsxImportSource jsx-htmx */`) added to your TSX file, you can seamlessly blend HTMX into your TypeScript projects while maintaining type safety. I've also included types to ensure your components align with the HTMX API, providing an extra layer of confidence in your codebase. ```tsx const Badge: SimpleCustomComponent = (props) => { return <div class="component">{props.children}</div>; }; ``` I've been using jsx-htmx in a couple of production sites, and so far, the performance has been solid, with render times consistently in the low milliseconds range. I'm eager to hear your thoughts and suggestions on how to improve jsx-htmx. Are there any specific features you'd like to see added? Any ideas for enhancing type safety or optimizing performance? Looking forward to your feedback! Cheers, M

Share card

Actual performance

4points
4comments
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Product HuntOn track for Day 1 leaderboard · Strong signals: single, using, code · Missing: mac, agents, macos
90%90% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
88%88% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
44%44% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Hacker NewsMay not resonate with HN audience · Strong signals: exist, existing, ide · Missing: https docs, excited, just released
44%44% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
36%36% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
13%13% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Cr
Crime Doesn't Climb in San Francisco60%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Crime Doesn't Climb in San Francisco

Hacker News145
DropK
DropK63%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

The tray that doesn't pretend

Product Hunt+95Productivity
Co
CookWing, an AI chef that doesn't hallucinate quantities40%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

CookWing, an AI chef that doesn't hallucinate quantities

Hacker News2
Su
SurviveJS – Webpack and React43%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

SurviveJS – Webpack and React

Hacker News1
D3
D3 with React54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

D3 with React

Hacker News2
Th
Thisless React52%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Thisless React

Hacker News3
Re
React bindings for Rails 5 ActionCable39%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

React bindings for Rails 5 ActionCable

Hacker News2
Re
React JSX Transformer for Coffeescript41%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

React JSX Transformer for Coffeescript

Hacker News3
A
A 2048 implementation in React47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A 2048 implementation in React

Hacker News9
An
Angular-react – ReactJS with AngularJS35%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Angular-react – ReactJS with AngularJS

Hacker News4