You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
testApp :: MonadWidget t m => m ()
testApp = do
routeApp "app" $ do
withPathSegment go
pure ()
where
go :: (MonadWidget t m, MonadRouted t m) => Dynamic t (Maybe PathSegment) -> m ()
go dPathSeg = do
(dyn . ffor dPathSeg) $ \ps -> do
case maybe "a" id ps of
"a" -> do
evt <- button "switch to View B"
redirectInternal $ ("b" <$ evt)
text "View A"
"b" -> do
evt <- button "switch to View A"
redirectInternal $ ("a" <$ evt)
text "View B"
pure ()
I get this error while running the code:
Could not deduce (NotReady t (RouteT t m))
arising from a use of ‘go’
from the context: MonadWidget t m
bound by the type signature for:
testApp :: MonadWidget t m => m ()
The text was updated successfully, but these errors were encountered:
MonadRouted was thrown together pretty quickly to get something usable. The new obelisk routing infrastructure is much more carefully thought out, so I would recommend switching to that.
How to use
routeApp
to add routing to my webpage.I get this error while running the code:
The text was updated successfully, but these errors were encountered: