loading...

Discussion on: YEW Tutorial: 01 Introduction

Collapse
ajinkyax profile image
Ajinkya Borade

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

Collapse
davidedelpapa profile image
Davide Del Papa Author

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.