The reason you can't find the classes!
macro, is because it isn't part of the latest 0.17.4 release.
If you check out the Yew Docs for classes, then you'll notice that they use vec!
in the examples. Similarly, if you check out the commit that was part of the 0.17.4 release, then you'll similarly see no usage of the classes!
macro anywhere.
If you browse the repository in its current state, then there's plenty uses of the classes!
macro. You can even check the next version of the Yew Docs for classes, which does feature the classes!
macro.
If you don't want to wait until the next release of yew
. Then you can update your dependency to use the repository instead.
[dependencies]
yew = { git = "https://github.com/yewstack/yew" }
Be warned though, any commit could potentially break your build. In that case to feel a bit less uneasy, you can target a specific commit.
[dependencies]
yew = { git = "https://github.com/yewstack/yew", rev = "60fed58" }
Then after that, importing classes!
is just:
use yew::{classes, html};