Improved state structure

This commit is contained in:
2026-02-01 13:40:22 +01:00
parent 8c4576396b
commit d40a032bc1
7 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ use crate::{
component::EventHandler,
engine::{Command, CommandExecutor},
render::DrawContext,
state::{use_effect, HookDependency},
hooks::{use_effect, HookDependency},
View,
};
+1 -1
View File
@@ -7,7 +7,7 @@
use std::sync::Arc;
use crate::component::{context::Context, scope::Scope};
use crate::{render::Point, state::HookDependency, View};
use crate::{render::Point, hooks::HookDependency, View};
/// Trait for converting values to RSX
pub trait ToRsx {
+1 -1
View File
@@ -1,4 +1,4 @@
//! # State Management Module
//! # State Management and Hooks Module
//!
//! Provides React-like hooks for managing component state and side effects.
//! This module includes useState, useEffect, useMount, and state synchronization hooks.
+2 -2
View File
@@ -44,7 +44,7 @@ pub mod component;
pub mod engine;
pub mod frontend;
pub mod render;
pub mod state;
pub mod hooks;
pub mod prelude {
//! Prelude module - Re-exports commonly used items for convenience
@@ -52,7 +52,7 @@ pub mod prelude {
pub use crate::engine::*;
pub use crate::frontend::*;
pub use crate::render::*;
pub use crate::state::*;
pub use crate::hooks::*;
pub use crate::{sleep, Error, Result, View, ViewWrapper};
pub use crossterm;
pub use osui_macros::{component, rsx};