@@ -63,9 +63,8 @@ const FrontPage: SFC = () => {
6363 < h2 > A SINGLE STATE TREE</ h2 >
6464 < p >
6565 Building your application as a single state tree is the most
66- straight forward mental model. No matter how you choose to
67- structure it, you will always have access to the state wherever
68- you need it
66+ straight forward mental model. You get a complete overview, but
67+ can still organize the state by namespacing it into domains
6968 </ p >
7069 </ div >
7170 < div >
@@ -89,18 +88,18 @@ h(Example, { name: "frontpage/statetree" })
8988 {
9089 compile ( `
9190\`\`\`marksy
92- h(Example, { name: "frontpage/actions " })
91+ h(Example, { name: "frontpage/effects " })
9392\`\`\`
9493 ` ) . tree
9594 }
9695 </ div > ,
9796 < div key = "1" >
98- < h2 > SAFE AND PREDICTABLE CHANGES </ h2 >
97+ < h2 > SEPARATION OF LOGIC </ h2 >
9998 < p >
100- When you build applications that performs many state changes
101- things can get out of hand. In Overmind you can only perform
102- state changes from < strong > actions </ strong > and all changes are
103- tracked by the development tool
99+ Separate 3rd party apis and logic not specific to your
100+ application by using < strong > effects </ strong > . This will keep
101+ your application logic pure and without low level APIs
102+ cluttering your code
104103 </ p >
105104 </ div > ,
106105 ] [ viewport . isMobile ? 'reverse' : 'slice' ] ( ) }
@@ -112,19 +111,72 @@ h(Example, { name: "frontpage/actions" })
112111 ) }
113112 >
114113 < div >
115- < h2 > FUNCTIONAL ACTIONS </ h2 >
114+ < h2 > SAFE AND PREDICTABLE CHANGES </ h2 >
116115 < p >
117- When pieces of logic becomes complex it is beneficial to write
118- functional code. Overmind provides and API named { ' ' }
119- < strong > operators </ strong > which gives you functional power as
120- simple actions
116+ When you build applications that performs many state changes
117+ things can get out of hand. In Overmind you can only perform state
118+ changes from < strong > actions </ strong > and all changes are tracked
119+ by the development tool
121120 </ p >
122121 </ div >
123122 < div >
124123 {
125124 compile ( `
126125\`\`\`marksy
126+ h(Example, { name: "frontpage/actions" })
127+ \`\`\`
128+ ` ) . tree
129+ }
130+ </ div >
131+ </ div >
132+ < div
133+ className = { css (
134+ styles . valueProposition ,
135+ viewport . isMobile && styles . valuePropositionMobile
136+ ) }
137+ >
138+ { [
139+ < div key = "0" >
140+ {
141+ compile ( `
142+ \`\`\`marksy
127143h(Example, { name: "frontpage/operators" })
144+ \`\`\`
145+ ` ) . tree
146+ }
147+ </ div > ,
148+ < div key = "1" >
149+ < h2 > FUNCTIONAL ACTIONS</ h2 >
150+ < p >
151+ When pieces of logic becomes complex it is beneficial to write
152+ functional code. Overmind provides and API named{ ' ' }
153+ < strong > operators</ strong > which gives you functional power as
154+ simple actions
155+ </ p >
156+ </ div > ,
157+ ] [ viewport . isMobile ? 'reverse' : 'slice' ] ( ) }
158+ }
159+ </ div >
160+ < div
161+ className = { css (
162+ styles . valueProposition ,
163+ viewport . isMobile && styles . valuePropositionMobile
164+ ) }
165+ >
166+ < div >
167+ < h2 > SNAPSHOT TESTING OF LOGIC</ h2 >
168+ < p >
169+ Bring in your application configuration of state, effects and
170+ actions. Create mocks for any effects. Take a snapshot of
171+ mutations performed in an action to ensure all intermediate states
172+ are met
173+ </ p >
174+ </ div >
175+ < div >
176+ {
177+ compile ( `
178+ \`\`\`marksy
179+ h(Example, { name: "frontpage/test" })
128180\`\`\`
129181 ` ) . tree
130182 }
0 commit comments