mirror of
https://github.com/ratatui-org/ratatui
synced 2025-02-16 14:08:44 +00:00
This change renames the `StatefulWidget::render` method to `render_stateful` to avoid conflicts with the `Widget::render` method. Often both the `Widget` and `StatefulWidget` traits are in scope, and when calling the `render` method on a `StatefulWidget` the compiler cannot determine which trait to use. This change resolves that issue by renaming the `StatefulWidget::render` method to `render_stateful`. The `StatefulWidget::render` method is still available, but it is deprecated. A default implementation of `render_stateful` is provided that calls the deprecated `render` method. Callers should update their code to use `render_stateful` instead of `render`. implementors of the `StatefulWidget` trait should update their implementations to implement `render_stateful` instead of `render`, and provide an implementation of `render` that calls `render_stateful`. This change is non-breaking. The deprecated `render` method will be removed in a future release of Ratatui (likely 0.29.0). Addresses part of a problem raised in <https://github.com/ratatui-org/ratatui/issues/996> |
||
---|---|---|
.. | ||
barchart.rs | ||
block.rs | ||
line.rs | ||
list.rs | ||
paragraph.rs | ||
sparkline.rs |