Choo Weekly #6 2018: thank you!

Yoshua Wuyts
choo
Published in
3 min readFeb 8, 2018

A new week, a new weekly! Let’s skip the introductions this time around, and dive straight in!

If this is your first time you’re hearing about Choo: we’re the tiny frontend framework you’ve always wanted to use. True story. Check out create-choo-app to have your first application working 5 minutes from now.

5000 stars on GitHub!

On Tuesday May 10th we made the first commit to Choo. Now 1 year and 9 months later we’ve passed 5000 stars on GitHub! We’re grateful for everyone that’s come along on this journey; it means the world to us.

We also recently found out we crossed the 100.000 downloads mark on npm. That means we’ve had about 150–200 downloads a day on average for as long as we’ve existed! Thank you!

5067 stars!

Reference → Docs

The response to our docs release last week has been great! We’re real happy that people are responding so well; it’s been a long way coming.

However, a piece of feedback we received was that choo.io/reference wasn’t the most intuitive url for docs. So our docs are now available on https://choo.io/docs! We feel this makes more sense, and are happy to have made the change!

Speaking of docs tho: we’re excited to finish the work we’ve been doing on our guides. Stay tuned for more on that!

Faster HTML parsing with hstream

As part of our effort to speed up Bankai, we noticed that in particular our HTML parsing wasn’t performing well. In particular the hyperstream package was starting to show its age.

So to improve that, Renée Kooi has created hstream, a library to efficiently stream HTML templates. It’s already live in Bankai today. Check it out on github.com/stackhtml.

create-choo-app v1.11.0

Improvements sometimes take a bit of time to come through. So too did our work on create-choo-app. But last week we’ve revisited it with the help of Yerko Palma, and applied a much-needed layer of polish!

create-choo-app now has service workers enabled by default for all new apps. This is cool, because it means that by default all your apps should be passing as 100/100/100/100/100 on Google’s Lighthouse audit!

Also check out the new default Choo app we create for you. We’ve included a screenshot below, but there’s also a live website if you want to see it in action yourself! https://welcome.choo.io

welcome.choo.io

Nanostate v1.2.0

Nanostate now has support for hierarchical state machines. Adding hierarchy to state machines is a form of composition that allows matching states if a particular state doesn’t match.

In nanostate it looks like this:

var nanostate = require('nanostate')

var machine = nanostate('green', {
green: { timer: 'yellow' },
yellow: { timer: 'red' },
red: { timer: 'green' }
})

machine.event('powerOutage', nanostate('flashingRed', {
flashingRed: { powerRestored: 'green' }
}))

machine.emit('timer')
console.log(machine.state)
// => 'yellow'

machine.emit('powerOutage')
console.log(machine.state)
// => 'flashingRed'

machine.emit('powerRestored')
console.log(machine.state)
// => 'green'

Shout out to Jonathan Dupré for all the hard work put into making this happen!

choo-notification

If you’ve ever interacted with the Web notification API, you might have noticed that it requires a good amount of boilerplate to set up permissions right. And once it works, you’ll probably need to wrap it for logging and other things.

To make the Notification API easier to use with Choo, we’ve released choo-notification! It’s a thin wrapper around the Notification API, exposing it entirely through Choo’s emitter API.

As an added bonus: we recorded authoring this plugin entirely on stream. Check out the recording below!

New Sites this week

There’ve been a few new sites created with Choo this week. Check it out!

Wrapping up

And that’s it for this week! Thanks for reading it all, and see you again next week. Happy hacking y’all!

If you’re working on something cool using Choo, let us know on @4kilobytes or Freenode#choo ✌️.

--

--