Yes, I'm humbling joining the fight to widespread Rust, with a tutorial on Yew.
Code to follow this tutorial
The code has been tagged w...
For further actions, you may consider blocking this person and/or reporting abuse
I feel
use yew::prelude::*;should be introduced when we create app.rs to stop compile errors if someone like me is writing down code as we proceed.And thanks a ton for making this a beautiful series :) going to follow you
Yes, that in fact is now the trend for the Rust crates writers: it is now common to leave a ::prelude containing a small subset of the imports usually needed to write out programs for the common use-cases.
It is a very beginners friendly practice, but it is useful also for the more seasoned programmers.
In any case, rustc alerts you of the unused imports, so feel free to add 'use's when you are trying things out, and then clean the code once the program works.
I'm just starting out following up with Yew examples. How can hot reloading be setup ? Or what is your workflow like ?
Ok, if you take a look at the end of tutorial 6 there you have it: hot reloading working like a charm. I use two scripts still, one to start and another to stop. However I already figured out something better, trying to make it into tutorial 7 or 8... They are coming out too long I reckon, that is why I keep changing things up and writing much ahead of publication. It's lot of material that I try to cover as simply as I can, but I'm not that good sadly....
I'm currently working on the post for hot reloading. Let's say I got a little ahead writing because I have to check my English too.
Another thing hit reloading is possible but not always good, because rust takes time to compile: you have to be careful not to save too often..
Give me sometime. Maybe I will add something of a good workflow at the beginning of next post
There is another UI library named elvisjs implemented by pure rust and wasm, you might try it out if you are interested.
Thank you. I'm actually planning a comparison between various similar tools, so I will definitely try out Elvis as well!