Skip to content

Releases: omniscientjs/omniscient

v2.0.1

10 Nov 20:05
Compare
Choose a tag to compare

Fixes

  1. Tests and examples use Immutable.js 3.0.0 and Immstruct 1.0.0.
  2. Fixed bug with shouldComponentUpdate and children (#19).

v2.0.0

29 Oct 20:25
Compare
Choose a tag to compare

As of v2.0.0, Omniscient is dependent of React v0.12.0. This React version introduces some changes, and no longer allows components, but elements. With this some changes, not too big but breaks the previous API.

Statics as properties

The most notable change is that the statics are moved to be a part of the properties.
Statics still doesn't effect whether or not the component should update.

Before you could do:

OmniscientComponent('someKey', cursor, statics);

But now you have to do:

OmniscientComponent('someKey', { cursor: cursor, statics: statics });

As a result of this, you now always get passed props to your render function.

Before you could do:

var OmniscientComponent = component(function (cursor) {
  return React.DOM.text({}, cursor.deref());
});

Now you have to do:

var OmniscientComponent = component(function (props) {
  return React.DOM.text({}, props.cursor.deref());
});

This:

OmniscientComponent(cursor);

Is translated to:

OmniscientComponent({ cursor: cursor });

You could also name your cursor:

var OmniscientComponent = component(function (props) {
  return React.DOM.text({}, props.name.deref());
});

// Usage
OmniscientComponent({ name: cursor });

With JSX

Also, with the way React now requires elements instead of components, there have to be a change in how we use Omniscient with JSX.

Before you could do:

<OmniscientComponent cursor={someCursor} />

But now you have to do:

<OmniscientComponent.jsx cursor={someCursor} />

// or
OmniscientComponent = OmniscientComponent.jsx;
<OmniscientComponent.jsx cursor={someCursor} />

// or
var OmniscientComponent = require('someComponent').jsx;
<OmniscientComponent.jsx cursor={someCursor} />

Notice the .jsx after OmniscientComponent

v1.3.1

29 Oct 19:14
Compare
Choose a tag to compare

Fixes

  1. Locks React dependency to pre 0.12.0.
  2. Fixes usage of statics with JSX.

v1.3.0

23 Oct 18:11
Compare
Choose a tag to compare

Additions

  1. Custom Omniscient Components can now have children:

    var Comp = component(function (cursor) {
       // this.props.children[0] === h1 element
    });
    
    var App = component(function (cursor) {
       return Comp(cursor.get('item'), React.DOM.h1(null, 'Hello'));
    });
  2. Adds regex filters for debugging

  3. Adds better print out for debug statements.

  4. Updates Immutable.js dependency to latest.

v1.2.0

17 Oct 15:34
Compare
Choose a tag to compare

Additions

  1. Adds possibility for overriding component.isCursor
  2. Adds possibility for overriding component.isEqualCursor

v1.1.0

17 Oct 15:34
Compare
Choose a tag to compare

Fixes

  1. Fixed bug with shouldComponentUpdate mixin, where the method couldn't be overridden.
  2. Removed duplicated dependencies from package.json.

Additions

  1. Added component name support for debugging
var Component = component(debugName, function () {});
  1. Adds debug method for printing out valuable debug-information for shouldComponentRender and render.