git.fiddlerwoaroof.com
Browse code

update site, reorder to match README

Ed Langley authored on 21/06/2017 00:40:16
Showing 2 changed files
... ...
@@ -43,7 +43,7 @@ port it to other environments that don't know what URLs are, and by
43 43
 simply removing the routing declaration, things will work as before.</p><p>As an added (and we think absolutely essential) benefit, your entire
44 44
 application becomes easier to test, as rendering is a pure function of
45 45
 Redux state, and model logic and route actions are entirely
46
-encapsulated in Redux outside of the app.</p></section><section><h2>Simple Routing in 25 lines</h2><pre><code class="javascript"><p>import installBrowserRouter from 'routedux';
46
+encapsulated in Redux outside of the app.</p></section><section><h2>Demo Site</h2><p>We have a demo codebase at <a href="https://github.com/cjdev/routedux-docs-demo">demo repository</a>.</p></section><section><h2>Simple Routing in 25 lines</h2><pre><code class="javascript"><p>import installBrowserRouter from 'routedux';
47 47
 import {createStore, compose, applyMiddleware} from 'redux';</p><p>const LOAD_USER = 'LOAD_USER';</p><p>function currentUserId() {
48 48
   return 42;
49 49
 };</p><p>function reduce(state = initialState(), action) {
... ...
@@ -102,7 +102,7 @@ by using the actions.</p><pre><code class="javascript"><p>const routesConfig = [
102 102
 ];
103 103
 // ... do store initialization</p><p>store.pathForAction({type:LOAD_USER, id: currentUserId()});</p><p>// returns /user/me</p><p>//  ActionLink</p><p>&lt;ActionLink action={{type:LOAD_USER, id: 123}}&gt;Link Text&lt;/ActionLink&gt;
104 104
 // renders as &lt;a href="/user/123"&gt;Link Text&lt;/a&gt;</p></code></pre></section><p>Now you have links, but your links always stay up to date with your
105
-routing configuration.</p><section><h2>Demo Site</h2><p>We have a demo codebase at <a href="https://github.com/cjdev/routedux-docs-demo">demo repository</a>.</p></section></section>
105
+routing configuration.</p></section>
106 106
 </root>
107 107
     </article>
108 108
     <script>hljs.initHighlightingOnLoad();</script>
... ...
@@ -52,7 +52,10 @@ application becomes easier to test, as rendering is a pure function of
52 52
 Redux state, and model logic and route actions are entirely
53 53
 encapsulated in Redux outside of the app.}
54 54
 
55
-◊section[#:headline "Simple Routing in 25 lines"]{
55
+◊section[#:headline "Demo Site"]{
56
+We have a demo codebase at ◊a[#:href "https://github.com/cjdev/routedux-docs-demo"]{demo repository}.
57
+
58
+}◊section[#:headline "Simple Routing in 25 lines"]{
56 59
 ◊pre{
57 60
 ◊code[#:class "javascript"]{
58 61
 import installBrowserRouter from 'routedux';
... ...
@@ -181,7 +184,5 @@ store.pathForAction({type:LOAD_USER, id: currentUserId()});
181 184
 Now you have links, but your links always stay up to date with your
182 185
 routing configuration.
183 186
 
184
-◊section[#:headline "Demo Site"]{
185
-We have a demo codebase at ◊a[#:href "https://github.com/cjdev/routedux-docs-demo"]{demo repository}.
186
-}
187
+
187 188
 }