clj-commons / secretary

A client-side router for ClojureScript.
773 stars 64 forks source link

Added an additional parameter to the dispatch! function to provide the matched route with optional context. #61

Open dtulig opened 9 years ago

dtulig commented 9 years ago

This is useful if you don't want to use a global atom and instead want to pass that atom or state at the time you are dispatching. It is also nice to be able to generally pass additional information that might not be part of the URI that is being dispatched.

The :request-context attribute is merged with the same map as :query-params and can be destructed the same way.