tinganho / composer-component Goto Github PK
View Code? Open in Web Editor NEWComponent classes and utilites for the Composer web framework.
License: MIT License
Component classes and utilites for the Composer web framework.
License: MIT License
Right now, relations between components are defined via the render
method. So there is a slight problem to get one instance or instantiate a component and get e.g. the fetch
method of an instance. Each child component is designed to be instantiated in the parent's render
method and NOT instantiated alone.
Get the fetch from the parent by asking it.
class A extends Component<P, S, E> {
render() {
<B></B>
}
}
let a: new A({ id: 'a' });
let [b, c] = a.getInstancesOf('b', 'c'); // will stop as soon as it encounters b and c
let d = a.getInstanceOf('d'); // will stop as soon as it encounters b and c
let [bResult, cResult, dResult] = await* [b.fetch(), c.fetch(), d.fetch()];
document.getElementById('someid').appendChild(a.renderToDOM()); // reuses the instances of b and c
The render method saves the instantiated instances.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.