
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.
hyperapp-loadable
Advanced tools
Experimental package to provide react-loadable like behavior to hyperapp
WIP This package is inspired be react-loadable. The main difference between the two packages is that this package targets hyperapp instead of react and thus does not have stateful components.
To work around this difference we use a mixin to provide a { loadable: {} } in the state as well as add actions: { loadable: { loaded: () => any }} for triggering an update/re-render after lazy-loaded module is available.
/* src/Test.js */
import { h } from "hyperapp";
export function Test(state, actions) {
return (
<div>{"Testing lazy-loaded component!"}</div>
);
}
import { h, app } from "hyperapp";
import Loadable from "hyperapp-loadable";
const Loading = (state, actions) => <div>{"Loading..."}</div>;
app({
view: (state, actions) => {
return (<Loadable
state={state}
actions={actions}
name={"/Test"}
loader={() => import("./Test")}
loading={Loading}
loaded={actions.loadable.loaded} /* not required defaults too actions.loadable.loaded */
/>);
},
mixins: [Loadable]
});
hyperapp-loadable is MIT licensed. See LICENSE.
FAQs
Experimental package to provide react-loadable like behavior to hyperapp
The npm package hyperapp-loadable receives a total of 2 weekly downloads. As such, hyperapp-loadable popularity was classified as not popular.
We found that hyperapp-loadable 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.