component / reactive

Tiny reactive template engine
383 stars 48 forks source link

View-specific Adapters #93

Closed anthonyshort closed 11 years ago

anthonyshort commented 11 years ago

View-specific adapters. Pretty simple. Libraries can provide their own adapters:

var Observable = require('observable');
var view = reactive(el, model);
view.adapter = Observable.adapter;

Same interface for global reactive adapter so this still works

reactive.adapter = Observable.adapter;

To make it affect all Reactive instances. If we get that use pull request in, it will be cleaner:

reactive.use(observable.adapter);
tj commented 11 years ago

LGTM! just needs a rebase apparently