Update example to show props deriving, text macro, etc

This commit is contained in:
Ryan McGrath 2019-06-05 21:49:41 -07:00
parent 290b57d336
commit 241cae3c93
No known key found for this signature in database
GPG key ID: 811674B62B666830
7 changed files with 50 additions and 24 deletions

View file

@ -26,3 +26,13 @@ pub use reconciler::key::ComponentKey;
lazy_static! {
pub static ref RENDER_ENGINE: RenderEngine = RenderEngine::new();
}
#[macro_export]
macro_rules! text {
($t:expr) => {
alchemy::RSX::text($t)
};
($format:tt, $($tail:expr),*) => {
alchemy::RSX::text(format!($format, $($tail),*))
};
}