
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
 
[!WARNING]
This project is still in early development and is not ready for use.
JSX is great for templating, but pulling in React can be overkill, and even when just using the types it can be confusing. hjsx (Hypertext + JavaScript Extensible Markup Language) aims to provide a simple way to use JSX on the server by rendering it to HTML.
It includes modified types for the JSX elements, with all event handlers removed, and a render
method that returns a string.
It is currently available on npm
, but I wouldn't recommend using it yet.
First, install the package:
bun i hjsx
Then you'll need to update your tsconfig.json to use the react-jsx
compiler option, and set the jsxFactory
and jsxFragmentFactory
options to hjsx
and hjsx.fragment
respectively:
{
"compilerOptions": {
"jsx": "react-jsx",
"jsxFactory": "hjsx",
"jsxFragmentFactory": "hjsx.fragment"
}
}
Now you can use JSX in your code:
import { type hjsx } from "hjsx";
type MyComponentProps = hjsx.Attributes & {};
export function MyComponent(props: MyComponentProps) {
return (
<>
<div {...props}>
<h1>c00l b34nz</h1>
</div>
</>
);
}
Check out the demo:
bun install
bun run examples/serve.ts
Contributions are welcome! Please help me. This is a cry for help.
FAQs
 
The npm package hjsx receives a total of 1 weekly downloads. As such, hjsx popularity was classified as not popular.
We found that hjsx demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.