Open patrick-steele-idem opened 9 years ago
Starting with this one - please change the questions if necessary...
<my-component/>
. While this is great to write compact tags, it sometimes leads to confusion, when to use the body of a component. As basically everything can be put into a component by further "componentizing" the UI - there should be some rules/best practices that help to decide, when/what should be placed in the body of a component...That's very helpful, @tindli. Thank you! Those are great questions and I'll definitely make sure the new docs address all of those questions. If you come up with any more questions please add them here.
@tindli Can you please clarify the following?
What is a bad example of a component that leaks its state?
Also, I have added a partial FAQ based on some of your questions. Please take a look and provide any feedback: https://github.com/raptorjs/marko-widgets/blob/view-state/docs/faq.md
As soon as I get some more time I will add more of your questions.
Thanks again for providing these questions!
By leaking state I mean, that instead of an exposed function, a direct reference to the widget is used and the setState() call is performed from somewhere outside the widget that does not own the manipulated state...
If this is possible, we should avoid that... (right?)... In my understanding, only the exposed functions should be used to manipulate state (if this is required)...
I am really happy with the FAQ! Great job.
I only have one "concern" so far:
Additionally, I would add the information, which of the functions are invoked on the server too...
Keep up with the great stuff! Many thanks.
Please provide good candidate questions here!