Overview of Osmos JSX Runtime
Osmos is a lightweight, framework-agnostic, server-only JSX runtime used to generate HTML on the server. Unlike client-first libraries like React, Osmos does not require a build step and is designed to eliminate the need for a full client-side API by generating the frontend entirely on the server. Key features include support for Async components, streaming rendering, and integrations with Unpoly and AdonisJS.
async function UsersList() {
const users = await User.all()
return (
<ul>
{users.map((user) => (
<li>{user.name}</li>
))}
</ul>
)
}
function App() {
return (
<html>
<body>
<UsersList />
</body>
</html>
)
}