Skip to main content

render

Function render 

Source
pub fn render<F>(component: F) -> AppBuilder<F>
where F: Fn() -> Element,
Expand description

Create an app builder for configuring and running a component.

This is the main entry point for running an rnk application. Returns an AppBuilder that allows fluent configuration.

§Default Behavior

By default, the app runs in inline mode (like Ink and Bubbletea):

  • Output appears at the current cursor position
  • Content persists in terminal history after exit
  • Supports println() for persistent messages

§Examples

use rnk::prelude::*;

// Inline mode (default)
render(my_app).run()?;

// Fullscreen mode
render(my_app).fullscreen().run()?;

// Custom configuration
render(my_app)
    .fullscreen()
    .fps(30)
    .exit_on_ctrl_c(false)
    .run()?;