You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hono v4.0.0 has just released with "client components". A great alternative to React, having properly designed Clerk components would be handy.
Client Components
hono/jsx was originally designed to run server-side as an alternative to template engines such as Mustache. Server-side JSX is an interesting experiment, creating a new stack to combine with HTMX and Alpine.js. But that's not all.
Now, hono/jsx runs on the client as well. We call it hono/jsx/dom or Client Components.
The exact same code as React runs with Hono's JSX.
The Hooks listed below are also implemented and you can create Client Components just like in React.
useContext
useEffect
useState
useCallback
use
startTransition
useDeferredValue
useMemo
useLayoutEffect
Memo
isValidElement
Ultra-small
The hono/jsx/dom is fast and ultra-small. It has a smaller JSX runtime dedicated to the DOM in addition to the common server and client ones. Just specify hono/jsx/dom instead of hono/jsx in tsconfig.json.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hono v4.0.0 has just released with "client components". A great alternative to React, having properly designed Clerk components would be handy.
Beta Was this translation helpful? Give feedback.
All reactions