In this example we a struct, arbitrarily named App to repreent the state of the program. It will hold the text to be displayed and a flag indicating if we need to exit the program.
We also separated the draw and the handle_key_event methods and moved the run method into the struct.
We also implemented the Widget. Later we'll use a lot more widgets to improve the look of the application.
[package]
name = "hello-world"
version = "0.1.0"
edition = "2021"
[dependencies]
crossterm = "0.28.1"
ratatui = "0.29.0"