Skip to content

Comment on Show HN: Sauron – A web framework in Rust that adheres to the Elm architectureparent

Comments

As long as all event callbacks are delegated into the update function and unified in an Msg enum, the code will have the same pattern regardless of how big the project is.

Didn’t mean callbacks, meant shape of the code with indents could get large and difficult to grep. JSX style macro over the top might help .

In that case, breaking up the functions into several smaller functions helps. The rule of thumb of the size of a function body shouldn't be larger than the size of a computer screen.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.