[GH-ISSUE #875] Mount/Unmount Hooks: is there something or some way to do this? #635

Open
opened 2026-03-04 01:06:39 +03:00 by kerem · 1 comment
Owner

Originally created by @verdverm on GitHub (Aug 30, 2023).
Original GitHub issue: https://github.com/rivo/tview/issues/875

Context, I have "components" and pages where I'd like to only run some data / net intensive things when they are visible.

Is there some mechanism to know if/when a UI element is mounted or visible?

Originally created by @verdverm on GitHub (Aug 30, 2023). Original GitHub issue: https://github.com/rivo/tview/issues/875 Context, I have "components" and pages where I'd like to only run some data / net intensive things when they are visible. Is there some mechanism to know if/when a UI element is mounted or visible?
Author
Owner

@verdverm commented on GitHub (Sep 2, 2023):

I actually forked tview 5 years ago to do this, adding Mount/Unmount throughout all the components.

I updated it this week and moved it here: https://github.com/hofstadter-io/hof/tree/_dev/lib/tui

Lots of extra stuff too, like a global event bus, two-way dependency injection (so modules are easy to hook up), base layout with logging & error consoles that can be shown as needed, a command bar (like bloomberd terminal) for fast access to anything... I forgot about it until just after making this issue, glad I did some archaeology!

<!-- gh-comment-id:1703578369 --> @verdverm commented on GitHub (Sep 2, 2023): I actually forked tview 5 years ago to do this, adding Mount/Unmount throughout all the components. I updated it this week and moved it here: https://github.com/hofstadter-io/hof/tree/_dev/lib/tui Lots of extra stuff too, like a global event bus, two-way dependency injection (so modules are easy to hook up), base layout with logging & error consoles that can be shown as needed, a command bar (like bloomberd terminal) for fast access to anything... I forgot about it until just after making this issue, glad I did some archaeology!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tview#635
No description provided.