Example of navigation/page changes in halogen

I’m experimenting with halogen/purescript, but I can really figure out the best way to accomplish this.

I would like to initialize the app with a list of choices (click one) that is then fed into the next ‘page’ of my application.

I’m unclear if this corresponds to slots… or state?. Is there any working example of something like ‘tabs’ that I can reference.

Have you already seen the “driver-routing” example and the purescript-routing library? Seems like you might use a combination of the two.

I use routing at work to set a Variant for my routing and it works all right (not yet using Halogen though)

1 Like

Thanks for the reply :slight_smile: I’ve had a look at the driver-routing example, but seems to be more concerned with feeding the hash into halogen and rendering it as text.

The purescript routing library looks neat. I think I will definitely be using that.

What I’m more trying to figure out, is given say the possible states in the purescript-routing library, how would I write a halogen ‘container’ that swaps out to each of the views expressed via the route. Eg PostIndex, PostBrowse etc.