dist/famous-flex.js
function _updateState() {
        var prevItem;
        var invalidated = false;
        var hiddenViewCount = 0;
        var i = 0;
        while (i < this._viewStack.length) {
            if (this._viewStack[i].state === ItemState.HIDDEN) {
                hiddenViewCount++;
                for (var j = 0; j < this._viewStack.length; j++) {
                    if ((this._viewStack[j].state !== ItemState.HIDDEN) &&
                        (this._viewStack[j].view === this._viewStack[i].view)) {
                        this._viewStack[i].view = undefined;
                        this._renderables.views.splice(i, 1);
                        this._viewStack.splice(i, 1);
                        i--;
                        hiddenViewCount--;
                        break;
                    }
                }
            }
            i++;
        }
        while (hiddenViewCount > this.options.keepHiddenViewsInDOMCount) {
            this._viewStack[0].view = undefined;
            this._renderables.views.splice(0, 1);
            this._viewStack.splice(0, 1);
            hiddenViewCount--;
        }
        for (i = hiddenViewCount; i < (Math.min(this._viewStack.length - hiddenViewCount, 2) + hiddenViewCount); i++) {
            var item = this._viewStack[i];
            if (item.state === ItemState.QUEUED) {
                if (!prevItem ||
                    (prevItem.state === ItemState.VISIBLE) ||
                    (prevItem.state === ItemState.HIDING)) {
                    if (prevItem && (prevItem.state === ItemState.VISIBLE)) {
                        prevItem.state = ItemState.HIDE;
                        prevItem.wait = item.wait;
                    }
                    item.state = ItemState.SHOW;
                    invalidated = true;
                }
                break;
            }
            else if ((item.state === ItemState.VISIBLE) && item.hide) {
                item.state = ItemState.HIDE;
            }
            if ((item.state === ItemState.SHOW) || (item.state === ItemState.HIDE)) {
                this.layout.reflowLayout();
            }
            prevItem = item;
        }
        if (invalidated) {
            _updateState.call(this);
            this.layout.reflowLayout();
        }
    }
function _updateState() {
        var prevItem;
        var invalidated = false;
        var hiddenViewCount = 0;
        var i = 0;
        while (i < this._viewStack.length) {
            if (this._viewStack[i].state === ItemState.HIDDEN) {
                hiddenViewCount++;
                for (var j = 0; j < this._viewStack.length; j++) {
                    if ((this._viewStack[j].state !== ItemState.HIDDEN) &&
                        (this._viewStack[j].view === this._viewStack[i].view)) {
                        this._viewStack[i].view = undefined;
                        this._renderables.views.splice(i, 1);
                        this._viewStack.splice(i, 1);
                        i--;
                        hiddenViewCount--;
                        break;
                    }
                }
            }
            i++;
        }
        while (hiddenViewCount > this.options.keepHiddenViewsInDOMCount) {
            this._viewStack[0].view = undefined;
            this._renderables.views.splice(0, 1);
            this._viewStack.splice(0, 1);
            hiddenViewCount--;
        }
        for (i = hiddenViewCount; i < (Math.min(this._viewStack.length - hiddenViewCount, 2) + hiddenViewCount); i++) {
            var item = this._viewStack[i];
            if (item.state === ItemState.QUEUED) {
                if (!prevItem ||
                    (prevItem.state === ItemState.VISIBLE) ||
                    (prevItem.state === ItemState.HIDING)) {
                    if (prevItem && (prevItem.state === ItemState.VISIBLE)) {
                        prevItem.state = ItemState.HIDE;
                        prevItem.wait = item.wait;
                    }
                    item.state = ItemState.SHOW;
                    invalidated = true;
                }
                break;
            }
            else if ((item.state === ItemState.VISIBLE) && item.hide) {
                item.state = ItemState.HIDE;
            }
            if ((item.state === ItemState.SHOW) || (item.state === ItemState.HIDE)) {
                this.layout.reflowLayout();
            }
            prevItem = item;
        }
        if (invalidated) {
            _updateState.call(this);
            this.layout.reflowLayout();
        }
    }
Updates the state.