News for hackers. Stuff that matters.
Re:Show HN: Monkberry – a JavaScript library for building we... by ruler88 on Wednesday June 29, 2016 @06:36PM (#12005339)
what problem does this library solve that reactjs does not solve?
Re:Show HN: Monkberry – a JavaScript library for building we... by ch4s3 on Thursday June 30, 2016 @12:56AM (#12006640)
Being 1kb. Not to be pedantic, but 147kb is a lot on a crappy connection, so if you have users in rural places with slow internet or tiny data caps, a small library like this may be useful.
Re:Show HN: Monkberry – a JavaScript library for building we... by drusepth on Thursday June 30, 2016 @01:15AM (#12006718)
Wouldn't you just use a CDN that your visitor's browser would pull a cached copy from if you were worried about large assets? They're only downloaded once*, might as well re-use the one downloaded the last time you visited a site with React. Or do I not understand how browser caching works?
Re:Show HN: Monkberry – a JavaScript library for building we... by jacobr on Thursday June 30, 2016 @02:03AM (#12006873)
This is nice in theory, but... A user visits site A. To get a cached version of React the following need to be true:

1. A user has to have visited a site, site B, with React recently. 2. The site with React needs to be using a publicly available CDN. 3. Site A and Site B must use the same CDN. 4. The versions of React must match exactly. There are already about a dozen alpha/patch/rc versions of the React 15.x.x series alone.

In practice, this does not happen very often: https://www.stevesouders.com/blog/2013/03/18/http-archive-jq...

Re:Show HN: Monkberry – a JavaScript library for building we... by JustSomeNobody on Thursday June 30, 2016 @08:25AM (#12008001)
Yeah, we need to save that 146kb so we can do dumb stuff like animate stars.
Re:Show HN: Monkberry – a JavaScript library for building we... by vortico on Wednesday June 29, 2016 @11:49PM (#12006436)
React minified is 147kb, which is actually significant if all you need is the functionality offered in Monkberry.
Re:Show HN: Monkberry – a JavaScript library for building we... by Torn on Thursday June 30, 2016 @08:01AM (#12007898)
Looking at the gzipped size on cdnjs

- react minified 43.2kb

- react-dom minified 723b

Re:Show HN: Monkberry – a JavaScript library for building we... by snissn on Wednesday June 29, 2016 @11:26PM (#12006380)
What problem does reactjs solve? Why are javascript libraries used instead of generating HTML server side? I feel I'm out of touch, could someone give me a quick primer?
Re:Show HN: Monkberry – a JavaScript library for building we... by guptaneil on Wednesday June 29, 2016 @11:45PM (#12006421)
The biggest advantage of client-side rendering is that clicking a link doesn't require a full-page reload. Dynamically updating small portions of a page allows for a more snappy experience, especially when on a cellular data connection.
Re:Show HN: Monkberry – a JavaScript library for building we... by yuchi on Thursday June 30, 2016 @03:03AM (#12007019)
Right and wrong. If that’s all you need to do search for SennaJS or PJAX. What really f/e frameworks and libraries help you build is complex interactive interfaces. If you don’t see their use then means you don’t need them.
Re:Show HN: Monkberry – a JavaScript library for building we... by andybak on Thursday June 30, 2016 @04:50AM (#12007329)
Yes. If people are using full MVC frameworks for the sole reason of avoiding page reloads then they really need to look at PJAX etc.

I can add PJAX to existing Django sites in about half an hour. It degrades gracefully, allows me to carry on generating my HTML on the server in a language I prefer and carries a very small cognitive overhead.

I understand TurboLinks in Rails is essentially the same concept?

Re:Show HN: Monkberry – a JavaScript library for building we... by yuchi on Thursday June 30, 2016 @10:24AM (#12008740)
Yeah, TurboLinks is the Rails counterpart.

To clarify a little: I personally use SennaJS a lot and React. They are two different things for different goals.

Re:Show HN: Monkberry – a JavaScript library for building we... by sesm on Thursday June 30, 2016 @06:45AM (#12007667)
This library uses two-way data binding like angular, vue.js and many others. Two-way data binding libraries/frameworks are easier to use on small websites, but don't scale well to large single page applications.
Re:Show HN: Monkberry – a JavaScript library for building we... by lizardskull on Wednesday June 29, 2016 @10:02PM (#12006122)
A more awesome name