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

make it easier to get from State to Extension #2917

Closed
lolbinarycat opened this issue Sep 20, 2024 · 3 comments · Fixed by #2991
Closed

make it easier to get from State to Extension #2917

lolbinarycat opened this issue Sep 20, 2024 · 3 comments · Fixed by #2991

Comments

@lolbinarycat
Copy link

Router::with_state mentions Extension as an alternative to State, but only after scrolling past 4 examples. extract::State doesn't mention Extension at all.

extensions are more modular, as they can be added to various handlers while keeping other handlers pure.

@Lachstec
Copy link
Contributor

Hi there! If I understand you correctly, you think it would be nice to mention the concept of Extension way earlier in the docs so that people reading it are made aware of their existence, as they can be a more suitable solution to their problem as relying on State?

I also think that the docs could be improved in that regard and would take a shot at it.

@lolbinarycat
Copy link
Author

yep, that is correct!

@Lachstec
Copy link
Contributor

Lachstec commented Oct 16, 2024

I openend a PR (#2991) , would love your Feedback. It's just what first came to my mind and can surely be improved further.

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 a pull request may close this issue.

2 participants