
Show HN: Mosaic – A declarative, front-end JavaScript library for building UIs - authman2
https://github.com/Authman2/Mosaic
======
purrcat259
Not sure if I am alone in this, but I tend to skip straight to demos after
skimming the first few lines. I guess it serves as a basic indicator that the
code actually works.

Would love to see some demos of this library.

~~~
bestest
Many examples of the library-in-action may be found on the homepage:
[https://mosaicjs.netlify.com](https://mosaicjs.netlify.com)

edit: update link

~~~
dmethvin
I wasn't able to find any working examples from the homepage, even with the
updated link. Can you link directly to a demo page or two that uses the
library, rather than a Github repo with code that uses the library?

~~~
bestest
Looks like they could improve their examples section. These are links to
jsfiddle from their documentation with some examples:

[https://jsfiddle.net/authman2/kdfzL2m5/39/embedded/js,html,r...](https://jsfiddle.net/authman2/kdfzL2m5/39/embedded/js,html,result/#Result)
[https://jsfiddle.net/authman2/e8nuydLo/39/embedded/js,html,r...](https://jsfiddle.net/authman2/e8nuydLo/39/embedded/js,html,result/#Result)
[https://jsfiddle.net/authman2/yfhsxrcm/35/embedded/js,html,r...](https://jsfiddle.net/authman2/yfhsxrcm/35/embedded/js,html,result/#Result)

------
akho
So you made a web thing and called it Mosaic.

~~~
arethuza
It would be amusing to write a basic web browser in JavaScript and call it
Mosaic...

------
Zelphyr
Can someone explain the trend of mixing HTML and JS code that has been
increasing lately? We fought for years to get away from that so I'm curious to
know what happened to make people think it was suddenly a good idea. I'm not
suggesting it's not or that it is permanently bad. I'd simply like to know why
it's good after being considered a bad practice for so long?

~~~
prezjordan
When building certain applications, it turns out those concerns aren't really
separate! It helps a lot to colocate the markup and the code that
generates/modifies it.

------
tobr
Looks fairly interesting. Two questions the documentation ought to answer:

1\. How mature is it? My assumption is that it’s _not_ mature, in which case
it’s more credible if the README says so.

2\. What would be the reason to use this instead of, say, lit-html or Preact
or Mithril.js?

------
misterdata
This looks a lot like Vue.js - how is it different/better?

------
crabl
This has some eerie similarities to
[Backbone.js]([https://backbonejs.org/#View-
extend](https://backbonejs.org/#View-extend)). That's not necessarily a bad
thing, because Backbone was doing its level best to compete as a framework in
its heyday, but it's still interesting to see how different it would be if
Backbone was designed today.

------
vladsanchez
[https://mosaicjs.netlify.com](https://mosaicjs.netlify.com) contains a lot of
broken links. If you really want to promote your library, fix them! Otherwise
ppl will focus on your broken windows instead of the value of your product.
Thanks for sharing Mosaic.

------
spankalee
The source looks like it has a lot of bits in it from lit-html. ️

------
darepublic
reminded me a bit of angularjs, with its constant watching of state data

