- components + component cache (should land in v6)
- async
.toString()
- all templates return a Promise
- single export of
{ App, Store, Component, html, raw }
- update history events, and move them into the
history:
namespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This version gives a "cannot move out of borrowed content error" | |
let ref fd = &self.fd.unwrap(); | |
// But I guess that's fair game. Docs say it "moves" content, which | |
// is not what we want. How about expect? | |
let ref fd = &self.fd.expect("Invalid state: no fd found in Sync::Write"); | |
// Nope, also doesn't work. This is the only version that works fine. | |
let fd = match &self.fd { | |
&Some(ref fd) => fd, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = class Emitter { | |
constructor () { | |
this.listeners = {} | |
} | |
on (event, listener) { | |
if (!this.listeners[event]) this.listeners[event] = [] | |
this.listeners[event].push(listener) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var { App } = require('choo') | |
var app = new App() | |
app.store(import('./stores/my-store')) | |
app.render('body') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"owner": "choojs" | |
} |
- structopt - Define data, get command line arguments.
- failure (tutorial) - structured error handling.
- configure - Environment variable configuration manager.
- The
structopt
crate will probably be merged into theclap
crate at some point. [email protected]
was released today, and folded thestructopt-derive
crate into its core. I wonder ifserde
andfailure
will be able to do the same in the future.configure
andstructopt
seem a bit at odds with each other.configure
works through env vars, whilestructopt
works through flags. The main use case I'm seeing forconfigure
right now is to toggle debug logging. Perhaps this is because I'm not writing network services for production use, yet.
- 13" Macbook Pro 3.3 GHz i7 (late 2016)
- Microsoft Surface Book (2016)
- Acer K272HUL 27" monitor 2560 x 1440
- Ergotron monitor arm
- Perixx PERIMICE-712B
- pass in LRU compatible thing into choo constructor
- pass in LRU compatible thing into separate, nested cache constructors
- add the
.get()
method to the cache - rename identity to
.id
this.local.todos.map(todo => this.cache.get(Todo, Todo.id(todo)).render(todo))