Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nonreactive examples for hooks were not compilable as written #2337

Merged
merged 5 commits into from
Jun 18, 2024

Conversation

rogusdev
Copy link
Contributor

@rogusdev rogusdev commented Apr 18, 2024

My code was out of date, so I missed b6d3da2 -- but I still caught one more, and added an example. Also tweaked the comments.

@rogusdev rogusdev force-pushed the correct-nonreactive-examples branch from 59e683d to 4b096ee Compare April 18, 2024 16:53
@rogusdev
Copy link
Contributor Author

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.

Copy link
Member

@ealmloff ealmloff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Non reactive props are also documented better after #2460

@ealmloff ealmloff merged commit 7ee3dc4 into DioxusLabs:main Jun 18, 2024
9 of 10 checks passed
@rogusdev rogusdev deleted the correct-nonreactive-examples branch June 19, 2024 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants