We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The state machine doesn't work...It's buggy to pass complex data to wasm, we need to use Closure instead of Fn, ref gesture.rs
Closure
Fn
The syntax of the state machine is hard to use, need to refactor as below
struct Hello { name: String, } impl LifeCyle for Hello { fn create(name: String) -> Self { Self { name } } fn render(&self) -> Center { Center::with(Text::with(&format!("Hello, {}", self.name))) } }
struct Counter { count: i32, } impl LifeCyle for Counter { fn create(count: i32) -> Self { Self { count } } fn render(&self) -> GestureDetector { GestureDetector::new( Text::with(format!("count: {}", &self.count)), ).register(Gesture::Tap, |&mut state| state.count += 1) } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The state machine doesn't work...It's buggy to pass complex data to wasm, we need to use
Closure
instead ofFn
, ref gesture.rsThe syntax of the state machine is hard to use, need to refactor as below
Components without state
Components with state
The text was updated successfully, but these errors were encountered: