seed
seed copied to clipboard
Add tips to handler panic message
... can return only Msg, Option<Msg> or ()! is the current panic message.
In the most cases users try to use incompatible Msg type (e.g. the parent's one instead of the submodule's one). We should advice them to check the Msg type and add a note that it will be changed to a compile-time error once it's possible in stable Rust.
Some related issues:
- https://github.com/seed-rs/seed/issues/500
- https://github.com/seed-rs/seed/issues/391
I went through this exact thing. Say the word and I'll do it. I'm assuming it's a relatively trivial change to docs?
Yeah, just small docs/comments changes. However they on relatively many places. I would be glad if you do it and it would be also better because I haven't encountered those problems by myself.
righto. In that case I'll do a grep for something like //!.*?return only Msg, Option<Msg> or ()!. If you can recommend a better grep, that would help.
I'll also look at the changes made in #499
I would just open VS Code, press Ctrl+Shift+F and write Msg, Option<Msg>.. it should be enough I hope.