fluxel
Version:
An ultra-lightweight, high-performance library for efficient DOM building and dynamic web UIs
13 lines (12 loc) • 494 B
JavaScript
import BaseFluxel from "../baseReactive.js";
const Fluxel = BaseFluxel;
Fluxel.createStatefulComponent = function(renderer, initialState) {
return (props = {})=>{
return Fluxel.reactive(typeof initialState === "function" ? initialState(props) : initialState || {}, (state)=>{
return renderer(props, state);
});
};
};
export { default as Fragment } from "../jsxFragment.js";
export { default as ensureNode } from "../jsxEnsureNode.js";
export default Fluxel;