dioxus icon indicating copy to clipboard operation
dioxus copied to clipboard

nonreactive examples for hooks were not compilable as written

Open rogusdev opened this issue 1 year ago • 1 comments
trafficstars

My code was out of date, so I missed https://github.com/DioxusLabs/dioxus/commit/b6d3da2b31c336fdf38845a790969edda9f8e0e7 -- but I still caught one more, and added an example. Also tweaked the comments.

rogusdev avatar Apr 18 '24 16:04 rogusdev

Notably: for the example, I did not call &*res.read_unchecked() as the docs suggest on https://dioxuslabs.com/learn/0.5/reference/use_resource -- instead choosing to simply do res(), which definitely works. If the longer syntax is preferred / recommended, I would like to update my example to keep best practices in all places, but I'd also like to hear why, thanks.

rogusdev avatar Apr 18 '24 16:04 rogusdev