mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 13:06:00 +03:00
[PR #302] [CLOSED] feat: improve lifecycle management #1217
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#1217
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/anomalyco/opentui/pull/302
Author: @limwa
Created: 11/11/2025
Status: ❌ Closed
Base:
main← Head:feat/improve-lifecycle-management📝 Commits (7)
9b016fefeat(renderer): add exit signals optione6138c2refactor(react): make renderer accessible from render454d001refactor(solid): make renderer accessible from render3dbe570refactor(solid): replace render with createRoot3887bb9refactor(core): simplify exit signal handling logic5ca7270fix(core): capture dump on exit02085e4chore(solid): remove render import from examples📊 Changes
8 files changed (+96 additions, -47 deletions)
View changed files
📝
packages/core/src/renderer.ts(+29 -9)📝
packages/react/src/reconciler/renderer.ts(+6 -10)📝
packages/solid/README.md(+3 -1)📝
packages/solid/examples/index.tsx(+6 -5)📝
packages/solid/examples/repro-empty-styled-text.tsx(+4 -3)📝
packages/solid/examples/repro-filter-list.tsx(+4 -2)📝
packages/solid/examples/repro-onSubmit.tsx(+4 -2)📝
packages/solid/index.ts(+40 -15)📄 Description
Fixes #248.
Changes
Core
exitSignalsoption to renderer, which specifies a list of signals that the renderer should destroy itself upon receiving.beforeExitevent. Theexitevent does not allow for more tasks to be added to the event loop, and thus theBun.sleep(200)call would be effectively ignored, preventing the captured logs from being dumped.React
createRootandrendermethods.rendermethods to make it easier to implement external lifecycle control.Solid
rendermethods to make it easier to implement external lifecycle control.@opentui/solidpackage as well. This is helpful for lifecycle control because it inherently exposes therenderer(the user has to create one beforehand).createRootmethod already exists in thesolid-jspackage, which could create some confusion. Should I rename it? Open to suggestions!@opentui/solidexamples and README.md to reflect the new API.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.