authman2 / mosaic Goto Github PK
View Code? Open in Web Editor NEW๐จ A front-end JavaScript library for building user interfaces!
License: MIT License
๐จ A front-end JavaScript library for building user interfaces!
License: MIT License
Sorry, it had to be done ๐
How do I render a conditionally checked / unchecked checkbox input?
this does not seem to work:
<input
type="checkbox"
onchange=${this.actions.handleChange}
${this.data.enabled ? 'checked' : ''}
/>
Checked inputs should be either <input type="checkbox" checked" />
or <input type="checkbox" checked="checked" />
, unchecked inputs SHOULD NOT have a checked
attribute in any form.
Would be nice to do some benchmarks, I guess it's simplicity would make it relatively fast off the bat.
import Mosaic from '@authman2/mosaic';
const app = new Mosaic({
element: '#app',
data: {
foo: 'ok'
},
view: (data) => {
return html`<div>${ data.foo }</div>`;
}
});
app.paint();
this code should display 'ok', right? He does not do this
Can you add the ability to pass an item to the painting method, not as an option in the Mosaic constructor?
const hello = Mosaic({
// element: '#root',
view: () => html`<span>Hello World</span>`
});
hello.paint('#root');
hello.paint('#app');
Hi, after reading the tutorial, I was trying to figure out how to pass data down to the child components, in the tutorial it says to add the data property as an html attribute with a string default value. I tried that but I don't seem to have gotten it working. Here's my codesandbox: https://codesandbox.io/s/agitated-archimedes-hsipi
You can see that the count is undefined in the child component.
Cheers.
I could not find how to render a list of sub components. Something like https://vuejs.org/v2/guide/list.html
How would you do to display a list of records?
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.