Yew: A Yew Realworld live demo

Created on 13 Dec 2019  路  14Comments  路  Source: yewstack/yew

Hi,

I'm working on a Yew version of Realworld frontend app, utilizing Rust and WebAssembly. It's full-functional right now. Can we add this as a relatively larger live demo, besides the todomvc demo?

It also includes yew-router usage, and yewtil usage of NeqAssign/Mrc/Irc will be added to improve performance soon. I'm also following recent refactorings on master branch of yew/yew-router and updating this repo accordingly.

Source: https://github.com/jetli/rust-yew-realworld-example-app
Live demo: https://jetli.github.io/rust-yew-realworld-example-app/

Possible further improvements:

  • [ ] Yewtil integration
  • [x] CI/CD integration
  • [x] Reduce .wasm size
  • [ ] Model/form client-side validations
  • [ ] Unit tests/benchmarks

@jstarry @hgzimmerman Welcome to review and help

Most helpful comment

An initial awesome yew is almost done: https://github.com/jetli/awesome-yew
I also created a logo for it. Welcome to contribute 馃槑

All 14 comments

I just noticed see-rs has a similar repo from a contributor: https://github.com/seed-rs/seed-rs-realworld , and mentions it on README

I'm all for including it within the README, with the caveat that if it eventually becomes unmaintained we would remove it (as long as you are willing to merge PRs from us that update the yew dependency, you shouldn't have to worry much about that, especially post 1.0.0).

Also don't worry too much about the Mrc/Irc pointers - I think of those as being really useful for when you copy large sets of data within Props - and only after you have done most other optimizations. NeqAssign should improve performance (a small amount) in places like: https://github.com/jetli/rust-yew-realworld-example-app/blob/969357c5544918b2ea9ce275c1201dfc8d589215/crates/conduit-wasm/src/components/list_pagination.rs#L44

I think that at the very least that while Yew is still young, that there should be a separate Projects.md for projects that aren't explicitly owned by the Yew project, but are publicly viewable and can serve as full-blown examples for people to take inspiration from. This page would be linked from the Readme.md.

Sounds cool to me, I'm willing to maintain it in long-term, and we can collect more examples/projects. I might try to use Mrc/Irc for article list pages which may contains large list or text.

can create a awesome-yew
something like awesome-react
https://github.com/enaqx/awesome-react

@thienpow haha, I just started to do this: https://github.com/jetli/awesome-yew

An initial awesome yew is almost done: https://github.com/jetli/awesome-yew
I also created a logo for it. Welcome to contribute 馃槑

Looks great! I'll give it a few more days and then I'll open a PR to add a link to it on Yew's Readme.md.

Feel free to open a PR if you think its ready before then. I'd stick it at the bottom of the Overview section.

Cool, I will open a PR to upstream https://github.com/sindresorhus/awesome next month, it requires that a repo must have been around for at least 30 days.

Standalone desktop app support is added by this new crate: https://github.com/jetli/rust-yew-realworld-example-app/tree/master/crates/conduit-webview, now yew app can be run as a desktop app 馃帀 , it looks like a slim Electron app in just ~3MB size, Electron apps are normally in 100+MB size.

desktop

Since awesome-yew is available now, I'm closing this issue

The project is added to Realworld repo officially, in Frontends section with title Rust + Yew + WebAssembly. 馃帀

Amazing! You rock 馃槑

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  5Comments

DenisKolodin picture DenisKolodin  路  5Comments

FrontMage picture FrontMage  路  4Comments

kellytk picture kellytk  路  3Comments

sackery picture sackery  路  3Comments