There are several ways to handle route changes. I don't have strong
opinions about it - do what works best for your application. As long you're
not coupling your reusable components too tightly to the routing strategy
you should be fine. I suspect how to best deal with routing in
ClojureScript is going to evolve quite a bit over time so it's best not to
tie your components to any particular approach.

David


On Fri, Apr 11, 2014 at 2:42 PM, <[email protected]> wrote:

> On Saturday, April 5, 2014 11:01:32 PM UTC+3, Moritz Ulrich wrote:
> > I used secretary[1] in combination with simple #-urls to do the job.
> >
> >
> >
> > [1]: https://github.com/gf3/secretary/
> >
> >
> >
> > On Sat, Apr 5, 2014 at 2:17 PM,  <[email protected]> wrote:
> >
> > > On Friday, April 4, 2014 12:25:53 AM UTC+3, David Nolen wrote:
> >
> > >> On Thu, Apr 3, 2014 at 5:22 PM, Sean Corfield <[email protected]>
> wrote:
> >
> > >>
> >
> > >>
> >
> > >>
> >
> > >>
> >
> > >> In the case of application state being modified "externally", would
> you recommend having an invisible Om component listen for those changes and
> apply them through transact! itself? Or is the approach of just swapping in
> a delta considered fully supported and "recommended"?
> >
> > >>
> >
> > >>
> >
> > >>
> >
> > >> (given the discussions I've been having with you on IRC and from my
> only playing with Om, I'd lean toward the former, but the latter is
> certainly "simpler")
> >
> > >>
> >
> > >>
> >
> > >>
> >
> > >> Sean
> >
> > >>
> >
> > >>
> >
> > >> "Invisible" components in Om are fully supported. This is precisely
> the idea behind om-sync, a reusable synchronization controller component
> which has no visual representation.
> >
> > >>
> >
> > >>
> >
> > >>
> >
> > >> I recommend the former approach. Using swap! is not something I
> recommend at all.
> >
> > >>
> >
> > >>
> >
> > >> David
> >
> > >
> >
> > > How would you guys recommend to do pushState route changes. Would be
> cool to do in an om component but i'd imagine route changes need to be
> transacted to application state after the event happens in order to support
> back/forward buttons.
> >
> > >
> >
> > > --
> >
> > > Note that posts from new members are moderated - please be patient
> with your first post.
> >
> > > ---
> >
> > > You received this message because you are subscribed to the Google
> Groups "ClojureScript" group.
> >
> > > To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected].
> >
> > > To post to this group, send email to [email protected].
> >
> > > Visit this group at http://groups.google.com/group/clojurescript.
>
> I mean how do you swap routes into application state?
>
> In order to do route changes with tx-listen you transact the new route to
> application state and pushState the new route. But in order to support back
> and forward buttons you also have to transact routes into app-state on
> pushState events, so the route change is transacted twice.
>
> Although maybe im just being stupid about it and should do it anyways. Am
> currently sticking to omchaya style core.async event channel
>
> --
> Note that posts from new members are moderated - please be patient with
> your first post.
> ---
> You received this message because you are subscribed to the Google Groups
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/clojurescript.
>

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to