-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
195 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
pub mod rsx_visitor; | ||
#[allow(unused_imports)] | ||
pub use self::rsx_visitor::*; | ||
pub mod render_plugin; | ||
#[allow(unused_imports)] | ||
pub use self::render_plugin::*; | ||
pub mod rsx_renderer; | ||
#[allow(unused_imports)] | ||
pub use self::rsx_renderer::*; | ||
pub mod rsx_visitor; | ||
#[allow(unused_imports)] | ||
pub use self::rsx_visitor::*; | ||
pub mod sweet_rsx_visitor; | ||
#[allow(unused_imports)] | ||
pub use self::sweet_rsx_visitor::*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,30 @@ | ||
use sweet::prelude::rsx; | ||
use sweet::prelude::Rsx; | ||
use sweet::prelude::RsxParts; | ||
|
||
|
||
struct Component { | ||
value: u32, | ||
} | ||
impl Rsx for Component { | ||
fn into_parts(self) -> RsxParts { | ||
rsx! { | ||
<div>{self.value}</div> | ||
} | ||
} | ||
} | ||
|
||
|
||
fn main() { | ||
let onclick = |_| {}; | ||
|
||
let _foo = rsx! { | ||
<div onclick> | ||
<p>hello</p> | ||
<Component value=7/> | ||
</div> | ||
}; | ||
|
||
let str = _foo.html.load().unwrap().to_string_placeholder(); | ||
println!("{}", str); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.