<commit_before>* [Introduction](#introduction)
* [Download](#download)
* [Dependencies](#dependencies)
* [Changelog](#changelog)
* [API documentation](#api-documentation)
* [Usage](#usage)
* [TodoMVC](#todomvc)
  * [App component](#app-component)
  * [Header component](#header-component)
  * [TodoList component](#todolist-component)
  * [TodoItem component](#todoitem-component)
  * [Footer component](#footer-component)
  * [Starting the application](#starting-the-application)
* [Principal differences from raw React](#principal-differences-from-raw-react)
* [Custom shouldComponentUpdate](#custom-shouldcomponentupdate)
* [Multi-binding component and default binding](#multi-binding-component-and-default-binding)
* [Default state publication](#default-state-publication)
* [requestAnimationFrame support](#requestanimationframe-support)
* [Other features](#other-features)
* [Future goals by priority](#future-goals-by-priority)
* [Credits](#credits)

# Introduction #

**Morearty.js** is a thin layer on top of [React](http://facebook.github.io/react/index.html) (implemented as a mixin) providing better state management facilities in the manner of [Om](https://github.com/swannodette/om) but written in pure JavaScript.

Underneath Morearty leverages immutable data structures provided by Facebook's [Immutable](https://github.com/facebook/immutable-js) library which hold the state of an application. That state is described by a single [Binding](https://rawgit.com/Tvaroh/moreartyjs/master/doc/Binding.html) object and all state transitions are performed through it. When an application component needs to delegate a part of its state to a sub-component, it can create a [sub-binding](https://rawgit.com/Tvaroh/moreartyjs/master/doc/Binding.html#sub) which points to a nested location within the global state and is fully synchronized with the original binding. This way every component knows only what it should know and the entire state is effectively encapsulated. Morearty detects any changes automatically and triggers re-rendering. Each component gets a correctly defined [shouldComponentUpdate](http://facebook.github.io/react/docs/component-specs.html#updating-shouldcomponentupdate) method that compares the component's state using straightforward JavaScript strict equals operator `===`. This is possible due to immutable nature of underlying data structures. So, only the components whose state was altered are re-rendered.

# Download #

Current version is 0.3.0. Test coverage is almost 100% with more than 190 test cases. Browser, AMD, Node.js environments are supported. You can get [production](https://raw.githubusercontent.com/Tvaroh/moreartyjs/master/dist/morearty.min.js) (18kb) and [development](https://raw.githubusercontent.com/Tvaroh/moreartyjs/master/dist/morearty.js) (57kb) versions. Or just `npm install morearty`. In browser loading with [Require.js](http://requirejs.org/) is preferable.

# Dependencies #

Morearty requires React version 0.11.1 or higher ([download](http://facebook.github.io/react/downloads.html)) and Immutable 2.0.16 or higher ([download](https://github.com/facebook/immutable-js/tree/master/dist)).

# Changelog #

* 0.3.0 - Reimplement Morearty as a React mixin. Better multi-binding components support. Method `getState` renamed to `getBinding`, introduced default binding [concept](https://rawgit.com/Tvaroh/moreartyjs/master/doc/Morearty.Mixin.html#getDefaultBinding). Update to Immutable 2.0.16.
* 0.2.4 - CommonJS modules, simplify build process (thanks to <NAME>). Update to Immutable 2.0.15.<commit_msg>Fix link<commit_after>* [Introduction](#introduction)
* [Download](#download)
* [Dependencies](#dependencies)
* [Changelog](#changelog)
* [API documentation](#api-documentation)
* [Usage](#usage)
* [TodoMVC](#todomvc)
  * [App component](#app-component)
  * [Header component](#header-component)
  * [TodoList component](#todolist-component)
  * [TodoItem component](#todoitem-component)
  * [Footer component](#footer-component)
  * [Starting the application](#starting-the-application)
* [Principal differences from raw React](#principal-differences-from-raw-react)
* [Custom shouldComponentUpdate](#custom-shouldcomponentupdate)
* [Multi-binding component and default binding](#multi-binding-components-and-default-binding)
* [Default state publication](#default-state-publication)
* [requestAnimationFrame support](#requestanimationframe-support)
* [Other features](#other-features)
* [Future goals by priority](#future-goals-by-priority)
* [Credits](#credits)

# Introduction #

**Morearty.js** is a thin layer on top of [React](http://facebook.github.io/react/index.html) (implemented as a mixin) providing better state management facilities in the manner of [Om](https://github.com/swannodette/om) but written in pure JavaScript.

Underneath Morearty leverages immutable data structures provided by Facebook's [Immutable](https://github.com/facebook/immutable-js) library which hold the state of an application. That state is described by a single [Binding](https://rawgit.com/Tvaroh/moreartyjs/master/doc/Binding.html) object and all state transitions are performed through it. When an application component needs to delegate a part of its state to a sub-component, it can create a [sub-binding](https://rawgit.com/Tvaroh/moreartyjs/master/doc/Binding.html#sub) which points to a nested location within the global state and is fully synchronized with the original binding. This way every component knows only what it should know and the entire state is effectively encapsulated. Morearty detects any changes automatically and triggers re-rendering. Each component gets a correctly defined [shouldComponentUpdate](http://facebook.github.io/react/docs/component-specs.html#updating-shouldcomponentupdate) method that compares the component's state using straightforward JavaScript strict equals operator `===`. This is possible due to immutable nature of underlying data structures. So, only the components whose state was altered are re-rendered.

# Download #

Current version is 0.3.0. Test coverage is almost 100% with more than 190 test cases. Browser, AMD, Node.js environments are supported. You can get [production](https://raw.githubusercontent.com/Tvaroh/moreartyjs/master/dist/morearty.min.js) (18kb) and [development](https://raw.githubusercontent.com/Tvaroh/moreartyjs/master/dist/morearty.js) (57kb) versions. Or just `npm install morearty`. In browser loading with [Require.js](http://requirejs.org/) is preferable.

# Dependencies #

Morearty requires React version 0.11.1 or higher ([download](http://facebook.github.io/react/downloads.html)) and Immutable 2.0.16 or higher ([download](https://github.com/facebook/immutable-js/tree/master/dist)).

# Changelog #

* 0.3.0 - Reimplement Morearty as a React mixin. Better multi-binding components support. Method `getState` renamed to `getBinding`, introduced default binding [concept](https://rawgit.com/Tvaroh/moreartyjs/master/doc/Morearty.Mixin.html#getDefaultBinding). Update to Immutable 2.0.16.
* 0.2.4 - CommonJS modules, simplify build process (thanks to <NAME>). Update to Immutable 2.0.15.
{'fraction_non_alphanumeric': 0.114501679731243, 'fraction_numerical': 0.009798432250839866, 'mean_word_length': 5.715225563909774, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 16, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5744080', 'n_tokens_mistral': 2057, 'n_tokens_neox': 1902, 'n_words': 618}