ratatui-reactive 0.2.0

A minimalistic framework for building TUI applications using fine-grained reactivity.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::{Component, ReactiveApp, Render};
use ratatui::Terminal;
use ratatui::backend::Backend;

#[inline]
pub async fn run_with_terminal<B: Backend, F: Render + 'static, C: Component<F>>(
    app: C,
    terminal: &mut Terminal<B>,
) -> Result<(), B::Error> {
    let app = ReactiveApp::new(app);
    while app.draw_requested().await {
        terminal.draw(|frame| app.draw(frame))?;
    }
    Ok(())
}