Should I be using a reactive variable in my list-detail view, and if so where? #2591
-
Below is a simple list-detail layout for a ticket browser, intended as a minimal front-end to GitHub issues, Jira or the like. A wrapper object is used to query the backend. When you pick a list item, the detail pane is reset. This is a familiar pre-AJAX MVC pattern. My intuition is that I "should" rather define a reactive variable, especially if I can make the code less verbose, but I couldn't figure out where. Perhaps the
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Textual has watch methods that will be called when when reactive attributes are modified. But you would still need to handle all the updates to your 'detail pane' - so unless I am missing something I don't think adding a reactive attribute would add much benefit here, at least from your example code? (I would suggest getting rid of all those |
Beta Was this translation helpful? Give feedback.
Textual has watch methods that will be called when when reactive attributes are modified. But you would still need to handle all the updates to your 'detail pane' - so unless I am missing something I don't think adding a reactive attribute would add much benefit here, at least from your example code?
(I would suggest getting rid of all those
global
variables though!)