component/reactive — pull request #107 by anthonyshort (2013-10-20 09:12:22+00:00)
Title: Refactored to remove global Reactive

This removes the global reactive to allow better modularity. This makes the object that you get back from `require('reactive')` to be a 'factory' function that creates a Reactive constructor. This constructor is completely
self-contained and won't affect other instances. This means there is essentially no global Reactive.

```js
var reactive = require('reactive');
var bindings = require('./my-bindings');

var bind = reactive()
.use(bindings)
.use(adapter);

// Instantly runs all bindings on the element
var view = bind(el, model);

view.set('foo, 'bar');
```

It means that we can apply adapters, filters and bindings to a reactive instance and then share that constructor around without polluting shared scope.

There could be a neater way of doing this, this was just the first thing that came to mind. Alternatively, we could have just added a `render` method or something to the prototype of `Reactive`. But I kind of like the interface for this. It could have looked like this.

```js
var reactive = require('reactive')();

reactive
.use(bindings)
.use(adapter);

var view = reactive.bind(el, model);
```

I don't like this because it implies that multiple elements can be bound to a single `reactive`.