-
Couldn't load subscription status.
- Fork 26
Rewrite the “State Management” section for clarity and beginner focus (#109) #114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Great @Alachi24 ! |
|
It's kindly attached here @Einswilli
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First of all, thank you so much for your contribution and your patience.
We would appreciate it if you could revise this documentation based on the feedback provided. The overall idea and structure are solid, but there are a few areas that need attention: some examples do not align with FletX’s APIs, there are references to non-existent methods, classes, or objects, certain functionalities are used incorrectly, and the documentation does not fully cover all aspects of state management with FletX.
We recommend taking a close look at the source code in fletx.core.state.py to see how it interacts with other components. Most importantly, please test the examples thoroughly and consider adding GIF previews to illustrate key points.
| --- | ||
|
|
||
| ### 🔄 Why reactivity matters | ||
| **Requirements:** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seectioin is unnecessary, you can remove it.
| --- | ||
|
|
||
| ## ⚖️ Static vs. Reactive Variables |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add more details (explanation) to this section.
|
|
||
| ```python | ||
| import flet as ft | ||
| from fletx import RxInt, obx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RxInt is under fletx.core and Obx widget is under fletx.widgets so import must be:
from fletx.core import RxInt
from fletx.widgets import Obx| --- | ||
|
|
||
| ### 📦 Built-in reactive types | ||
| ## 🧮 Example 1 — Simple Counter App |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be nice to add a preview of this example
|
@Einswilli Thank you for that feedback. The clarity gained has helped me improve where needed, and it has also added to my knowledge of FletX. I’ve revised the examples to ensure they’re now fully functional and testable. Updates have been made to places that require it. |
|
Thanks @Alachi24 , i'll. reviiew it very soon. |
Summary
Refined and expanded the State Management docs for better clarity, accuracy, and developer onboarding. The section now provides more hands-on examples, clearer explanations, and improved structure while keeping the original tone and flow.
✅ Key Improvements
⚙️ Fixes
.valueusage and watcher behavior🚀 Outcome
No breaking changes.
Purely a documentation and structure improvement — ready for merge ✅
Closes #109