![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
A JavaScript framework for creating fully-featured web applications, components libraries, and single web components with unique declarative and functional architecture
hybrids is a JavaScript UI framework for creating fully-featured web applications, components libraries, or single web components with unique mixed declarative and functional architecture.
The main goal of the framework is to provide a complete set of tools for the web platform - everything without external dependencies. It supports building UI components, managing complex states, creating app flows with client-side routing, and localizing its content for the worldwide markets. All of the parts follow the same unique concepts making it easy to understand and use!
The component model is based on plain objects and pure functions*, still using the Web Components API under the hood:
import { html, define } from "hybrids";
function increaseCount(host) {
host.count += 1;
}
export default define({
tag: "simple-counter",
count: 0,
render: ({ count }) => html`
<button onclick="${increaseCount}">
Count: ${count}
</button>
`,
});
<simple-counter count="42"></simple-counter>
* Pure functions only apply to the component definition. Side effects attached to event listeners might mutate the host element.
You can read more in the Component Model section of the documentation.
Built-in support for automatic translation of the component's content makes translation seamless and easy to integrate. Additionally, the framework provides a way to add dynamic messages with plural forms, HTML content, or use messages outside of the template context. Also, it comes with handy CLI tool to extract messages from the source code!
import { define, html, localize } from "hybrids";
export default define({
tag: "my-element",
name: "",
render: ({ name }) => html`
<div>Hello ${name}!</div>
`,
});
localize("pl", {
"Hello ${0}!": {
message: "Witaj ${0}!",
},
});
You can read more in the Localization section of the documentation.
The store module provides a global state management based on declarative model definitions with built-in support for async external storages, relations, offline caching, and many more. It follows the declarative architecture to simplify the process of defining and using data structures:
import { define, store, html } from "hybrids";
const User = {
id: true,
firstName: "",
lastName: "",
[store.connect] : {
get: id => fetch(`/users/${id}`).then(res => res.json()),
},
};
define({
tag: "my-user-details",
user: store(User),
render: ({ user }) => html`
<div>
${store.pending(user) && `Loading...`}
${store.error(user) && `Something went wrong...`}
${store.ready(user) && html`
<p>${user.firstName} ${user.lastName}</p>
`}
</div>
`,
});
<my-user-details user="2"></my-user-details>
You can read more in the Store section of the documentation.
The router module provides a global navigation system for client-side applications. Rather than just matching URLs with the corresponding components, it depends on a tree-like structure of views, which have their own routing configuration in the component definition. It makes the URLs optional, have out-the-box support for dialogs, protected views, and many more.
import { define, html, router } from "hybrids";
import Home from "./views/Home.js";
export define({
tag: "my-app",
views: router(Home),
content: ({ views }) => html`
<my-app-layout>
${views}
</my-app-layout>
`,
});
<my-app></my-app>
You can read more in the Router section of the documentation.
The project documentation is available at the hybrids.js.org site.
hybrids is released under the MIT License.
FAQs
A JavaScript framework for creating fully-featured web applications, components libraries, and single web components with unique declarative and functional architecture
The npm package hybrids receives a total of 1,572 weekly downloads. As such, hybrids popularity was classified as popular.
We found that hybrids demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.