Skip to content

Commit

Permalink
added docstring imprvement
Browse files Browse the repository at this point in the history
  • Loading branch information
awkay committed Feb 11, 2019
1 parent cb1da81 commit 50f57f4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/main/fulcro/incubator/dynamic_routing.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@
(dext/defextended-defsc defsc-route-target [[`RouteLifecycle false] [`RouteTarget true]]))

(defn ssr-initial-state
"A helper to get initial state database for SSR.
"(ALPHA) A helper to get initial state database for SSR.
Returns:
Expand All @@ -519,9 +519,13 @@
:props props-to-render}
```
IMPORTANT NOTE: will-enter for the routes will *not* get a reconciler (since there
IMPORTANT NOTES:
- `will-enter` for the routes will *not* get a reconciler (since there
isn't one). Be sure your routers will tolerate a nil reconciler.
"
- This has not been well-tested. It is known to render correct HTML in simple cases, but the initial state
may not actually be correct for the starting app with respect to the routers.
"
[app-root-class root-router-class route-path]
(let [initial-tree (prim/get-initial-state app-root-class {})
initial-db (ssr/build-initial-state initial-tree app-root-class)
Expand Down

0 comments on commit 50f57f4

Please sign in to comment.