Skip to content

Commit 20cf520

Browse files
author
Vlad Balin
committed
Added reference to React-MVx
1 parent 0c790b3 commit 20cf520

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

docs/chapters/react-binding.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# ReactJS bindings
2+
3+
[React-MVx](https://volicon.github.io/React-MVx/) is an MVVM application frameworks which uses Type-R to manage a multi-layer application state.
4+
5+
- React-MVx adds [two-way data binding](https://volicon.github.io/React-MVx/#link) capabilities to both Record and Collection. Data-binding is based on the ["value link" pattern](https://medium.com/@gaperton/managing-state-and-forms-with-react-part-1-12eacb647112) and implemented with Link class from [NestedLink](https://github.com/Volicon/NestedLink) library taking the value and validation error directly from the Record.
6+
- [Record](https://volicon.github.io/Type-R/#record) class is used to manage [component's state](https://volicon.github.io/React-MVx/#state).
7+
- The subset of the [Record attributes type annotation](https://volicon.github.io/Type-R/#definition) is used to define component [props](https://volicon.github.io/React-MVx/#props) and [context](https://volicon.github.io/React-MVx/#context).
8+
- [Store](https://volicon.github.io/Type-R/#store) class is used to represent [component's store](https://volicon.github.io/React-MVx/#store) (also called "local store"), which is typically used in the root component of SPA page associated with a route. The state of the children components uses upper component's stores to resolve id-references.
9+
- Type-R [global store](https://volicon.github.io/Type-R/#-static-store-global) may be used as a store for the data shared by application pages. This store is used to resolve id-references in case if local stores lookup failed.
10+
11+
<aside class="warning">
12+
The meaning of the Store in Type-R and React-Mvx is very different to that in other frameworks. The sole reason you need the store is to have collections of records which are being used to resolve id-references. If you don't have <a href="https://volicon.github.io/Type-R/#id-references">id-references</a> in JSON, you don't need stores. Use state instead.
13+
</aside>

docs/index.html

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1420,7 +1420,18 @@ <h3 id="recordorcollection-getstore-">recordOrCollection.getStore()</h3>
14201420
<h3 id="recordorcollection-clone-pinstore-true-">recordOrCollection.clone({ pinStore : true })</h3>
14211421
<p>Make the cloned object to preserve the reference to its original store.</p>
14221422
<p>Cloned objects don&#39;t have an owner by default, thus they loose the reference to their store as no ownership chain can be traversed. <code>pinStore</code> option should be used in such a cases.</p>
1423-
<h1 id="class-definitions-and-mixins">Class definitions and mixins</h1>
1423+
<h1 id="reactjs-bindings">ReactJS bindings</h1>
1424+
<p><a href="https://volicon.github.io/React-MVx/">React-MVx</a> is an MVVM application frameworks which uses Type-R to manage a multi-layer application state.</p>
1425+
<ul>
1426+
<li>React-MVx adds <a href="https://volicon.github.io/React-MVx/#link">two-way data binding</a> capabilities to both Record and Collection. Data-binding is based on the <a href="https://medium.com/@gaperton/managing-state-and-forms-with-react-part-1-12eacb647112">&quot;value link&quot; pattern</a> and implemented with Link class from <a href="https://github.com/Volicon/NestedLink">NestedLink</a> library taking the value and validation error directly from the Record.</li>
1427+
<li><a href="https://volicon.github.io/Type-R/#record">Record</a> class is used to manage <a href="https://volicon.github.io/React-MVx/#state">component&#39;s state</a>.</li>
1428+
<li>The subset of the <a href="https://volicon.github.io/Type-R/#definition">Record attributes type annotation</a> is used to define component <a href="https://volicon.github.io/React-MVx/#props">props</a> and <a href="https://volicon.github.io/React-MVx/#context">context</a>.</li>
1429+
<li><a href="https://volicon.github.io/Type-R/#store">Store</a> class is used to represent <a href="https://volicon.github.io/React-MVx/#store">component&#39;s store</a> (also called &quot;local store&quot;), which is typically used in the root component of SPA page associated with a route. The state of the children components uses upper component&#39;s stores to resolve id-references.</li>
1430+
<li>Type-R <a href="https://volicon.github.io/Type-R/#-static-store-global">global store</a> may be used as a store for the data shared by application pages. This store is used to resolve id-references in case if local stores lookup failed.</li>
1431+
</ul>
1432+
<aside class="warning">
1433+
The meaning of the Store in Type-R and React-Mvx is very different to that in other frameworks. The sole reason you need the store is to have collections of records which are being used to resolve id-references. If you don't have <a href="https://volicon.github.io/Type-R/#id-references">id-references</a> in JSON, you don't need stores. Use state instead.
1434+
</aside><h1 id="class-definitions-and-mixins">Class definitions and mixins</h1>
14241435
<h2 id="class-definitions">Class Definitions</h2>
14251436
<p>Type-R mechanic is based on class transformations at the moment of module load. These transformations are controlled by <em>definitions</em> in static class members.</p>
14261437
<h3 id="-decorator-definitions-propname-rule-"><code>decorator</code> @definitions({ propName : <code>rule</code>, ... })</h3>

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ includes:
1212
- observable
1313
- validation
1414
- io
15+
- react-binding
1516
- mixins
1617
- releasenotes
1718

0 commit comments

Comments
 (0)