git.iko.soy/typeable/reflex-dom-nested-routing
on master help sign in
Add README with example
commit9f97ecc0394c8e936050ac63ffb0b5aa3b4c129d author3noch <eacameron@gmail.com> dateFri 6 Oct 2017, 22:17 (9 years ago) parent06d0544
1 file changed+14
README.md+14
README.mdnew file+14
@@ -0,0 +1,14 @@
1+# Nested Routing for Reflex-DOM
2+
3+Example:
4+
5+```haskell
6+app = runRouteWithPathInFragment $ do
7+ switchPromptly never =<< withRoute (\route -> case fromMaybe "" route of
8+ "" -> dashboard user
9+ "users" -> users user
10+ "test" -> codeToRun >> pure never
11+ "settings" -> text "Settings" >> pure never
12+ _ -> redirectLocally []
13+ )
14+```