This is a very strange problem, when the data type for View id or state is a list of Text, and the data contains new line character, calling any update handler will result in an error similar to this:
No Handler for Event viewId: Message ["\n"] action: Edit d1c8ab99-45b3-4dad-8a5a-f50563ab9ebd
Here is a snippet of the code:
page :: Page es '[Message]
page = do
works <- allWorks
pure $ layout Works $ do
hyper (Message ["\n"]) $ homeView
data Message = Message [Text]
deriving (Generic, ViewId)
instance HyperView Message es where
data Action Message = Hello
update Hello = do
pure $ helloView