Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ranile/yew-vdom-gen
Construct Yew’s Virtual DOM using ergonomic Rust idioms.
https://github.com/ranile/yew-vdom-gen
ergonomics rust vdom yew
Last synced: 3 months ago
JSON representation
Construct Yew’s Virtual DOM using ergonomic Rust idioms.
- Host: GitHub
- URL: https://github.com/ranile/yew-vdom-gen
- Owner: ranile
- Created: 2021-07-30T18:59:54.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-03-09T17:12:53.000Z (almost 2 years ago)
- Last Synced: 2024-10-08T11:07:10.411Z (3 months ago)
- Topics: ergonomics, rust, vdom, yew
- Language: Rust
- Homepage: https://crates.io/crates/yew-vdom-gen
- Size: 125 KB
- Stars: 18
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Yew VDOM Generator
Construct Yew’s Virtual DOM using ergonomic Rust idioms.
The API is based around functions and makes no use of macros, like `yew::html!` which allows it to provide great
IDE support. IntelliSense is your friend when using this library.## Usage
```rust
use yew::prelude::*;
use yew_dsl::prelude::*;struct Component1;
impl Component for Component1 {
// ...
fn view(&self) -> Html {
h1("Heading ").into()
}
}struct Component2;
impl Component for Component2 {
// ...
fn view(&self) -> Html {
div()
.component::(yew::props!(Component1::Properties {}))
.child(h2("test2"))
.listener(on_click(|_e| log!("test")))
.into()
}
}
```## Documentation
The API docs are hosted on [docs.rs](https://docs.rs/yew-dsl).