FormidableLabs / FormidableLabs/envy-tui
Investigate how to nest components
- Dominant language
- Rust
- Stars
- 6
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
The new `JSONViewer` component introduced in #49 is rendered within the `Home` component. The `App` component has no knowledge of its existence, so `JSONViewer` is dependent upon specific logic within `Home` to call `json_viewer.update` and `json_viewer.register_action_handler`
This works, but it does not scale. As more components are added to `Home` this custom logic will grow in size and complexity.
Should `Home` have a property of `components` similar to `App` that contains all components that require wiring? Alternatively, should the component instead be surfaced to `App`, and then `Home` just needs to call `render` on any nested components?
Please investigate a recommended approach
Contributor guide
Assessment
This issue has not been assessed yet.