r/purescript • u/ctenbrinke • May 30 '21
Halogen: creating initial component state in Effect Monad?
The initial state constructor of a Halogen component has the type initialState :: forall input. input -> State. However, I would like the initial state to depend on some browser state (namely the fragment of the URL). Is it possible to construct the initial state in the Effect Monad somehow?
2
Upvotes
View all comments
Show parent comment
1
u/ctenbrinke May 31 '21
Thanks! That's a lot easier than I thought