Experiences using leptos or yew in production (or giving up trying)?
from Sibbo@sopuli.xyz to rust@programming.dev on 11 Apr 13:27
https://sopuli.xyz/post/25252216

I made a small project using leptos, but after updating leptos ended up with some unfixable bugs. The error and warning messages are too inaccurate, and due to all reactivity being implicit, it is hard to read my code now and figure out what would be wrong.

I thought about rewriting everything in yew, but was wondering if things work better there. As far as I understand, there is no such thing as implicit reactivity in yew, and everything that needs to be reactive needs to be wrapped in certain types. But I am fine with that, even though #[derive(Store)] in leptos was convenient.

Does anyone use leptos or yew in production or for any more serious projects, and can share some experiences? How do you usually debug your applications? Have you given up on some application that just didn’t work?

#rust

threaded - newest

asudox@lemmy.asudox.dev on 11 Apr 13:45 next collapse

afaik yew is dead. The last release was 2 years ago.

fxomt@lemmy.dbzer0.com on 11 Apr 14:10 next collapse

Yew is dead. Maybe try out dioxus? Its my preferred tool.

Sibbo@sopuli.xyz on 11 Apr 15:18 collapse

It looks cool, thanks!

alzymologist@sopuli.xyz on 11 Apr 17:59 next collapse

Even 2 years ago, yew was way way worse than actually writing js by hand.

Ephera@lemmy.ml on 11 Apr 21:34 collapse

We use Leptos at $DAYJOB for a web-UI of medium complexity. Debugging is mainly a matter of println-debugging, to be honest. Well, with log statements. We use tracing-web for logging to the browser console (if you’re using log rather than tracing, you can do the same with console_log). And then console_error_panic_hook to make panics visible in the browser console.

None of this is particularly great. Sometimes you get a stacktrace and no chance to try to debug it, because it happens in compiled WebAssembly. Sometimes you run into reactivity issues, which you just have to try to reproduce and narrow down why it happens.

You do gain experience over time and can spot issues more quickly or code it correctly upfront. And well, I’ve never seen a frontend framework, which was immediately intuitive in its reactivity or similar. Humans are just a messy interface.

Yeah, not sure what else to add. The upgrade to Leptos 0.7 was definitely a challenge, but we managed to push through, although I would not have wanted to do that without some of the experiences I’ve made with personal projects.
Feel free to ask questions, if you want to know anything more concrete.