@@ -28,6 +28,7 @@ safe to use it as a replacement for `react`.
2828
2929If you're migrating from backbone-based frameworks such as ` ChaplinJS ` or ` Marionette ` ,
3030you need to do following things to make convergence layer work properly:
31+
3132- Make sure that frameworks includes ` nestedtypes ` instead of ` backbone ` .
3233- On application start, tell ` nestedreact ` to use proper base class for the View.
3334 `React.useView( Chaplin.View )`
@@ -70,7 +71,8 @@ attribute spec syntax). It has following implications:
7071- State attributes behaves as regular object attributes, which can be directly accessed and assigned.
7172- State attributes can hold deeply nested models and collections; deep changes will be automatically detected and will cause component update.
7273
73- In addition,
74+ In addition,
75+
7476- ` state ` property from mixins will be properly merged. So, mixins can have state too.
7577- You can specify the base class for state model using ` Model ` component's property.
7678- Entire model's state can be externally defined as ` NestedTypes ` Model, and attached to component by referencing it in ` Model ` property.
@@ -139,6 +141,7 @@ NestedReact support this optimization, comparing props model's and collection ve
139141and comparing other props values for strict equality.
140142
141143To enable this optimization for the particular component, you need to:
144+
142145 - Declare all props that will be tracked for changes in ` props ` (or ` propTypes ` ) spec.
143146 Which is the good practice by itself, so you encouraged to do it unless you're using
144147 stateless function components syntax, which is preferable.
@@ -169,6 +172,7 @@ NestedReact `props` spec uses the simple subset of `state` spec, and acts as sub
169172 it internally compiles itself to the ` propTypes ` and ` getDefaultProps() ` ).
170173
171174Following type annotations are allowed for ` props ` :
175+
1721761 . Constructor functions: ` prop1 : String `
1731772 . Constructors with default value: ` prop2 : String.value( "default string" ) `
1741783 . JSON and primitive values: ` prop3 : "default string" `
0 commit comments