Props, reconciler fixes, demo fixes

This commit is contained in:
Ryan McGrath 2019-06-05 21:15:46 -07:00
parent 47163c64f9
commit 290b57d336
No known key found for this signature in database
GPG key ID: 811674B62B666830
17 changed files with 284 additions and 190 deletions

View file

@ -0,0 +1,31 @@
//! This is a generic view used for avoiding a circular dependency issue.
//! You should never need to touch this.
use std::any::Any;
use crate::ComponentKey;
use crate::traits::{Component, Props};
#[derive(Default)]
pub struct GenericRootViewProps;
/// This is never actually created, and is here primarily to avoid a circular
/// depedency issue (we can't import the View from alchemy's core crate, since the core crate
/// depends on this crate).
pub struct GenericRootView;
impl GenericRootView {
fn get_default_props() -> GenericRootViewProps {
GenericRootViewProps {}
}
}
impl Props for GenericRootView {
fn set_props(&mut self, _: &mut Any) {}
}
impl Component for GenericRootView {
fn new(_: ComponentKey) -> GenericRootView {
GenericRootView {}
}
}