AaronErhardt / AaronErhardt.github.io

My personal blog

Home Page:https://aaronerhardt.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Complete Code in Example is not complete

tronta opened this issue · comments

In the complete example the main function is missing: https://aaronerhardt.github.io/relm4-book/book/reusable_components.html
It would be great if all examples could be executed by copy paste.

Well, in this case there's no main function. It's a component written for a library and the user needs to use this component in an actual application. See: https://aaronerhardt.github.io/relm4-book/book/reusable_components.html#conclusion

But maybe I should make this more clear?

People like me paste at the beginning the full code into the IDE and follow the code there. 😄
So I guess what would be cool, if there could be two files or a link to the repo

But there is a link to repo. The "alert" example is explicitly mentioned at the end. Or should I mention it at the top already?

You are right. I just overlooked it. The problem is, that I look directly for the headline and start reading from there.
Imho the clearest would be to put this part of the conclusion there.

Should be fixed now. I moved the comment to the top.