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

docs: bring warning on shadowing context correctly from 0.6 #2795

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

agraboso
Copy link
Contributor

@agraboso agraboso commented Aug 7, 2024

Brings the section titled "Warning: Shadowing Context Correctly" in the documentation for provide_context back from the 0.6 docs, updating use leptos::* to use leptos::prelude::* in the examples, and adding a use leptos::context::Provider in the appropriate example.

@gbj
Copy link
Collaborator

gbj commented Aug 10, 2024

Yeah this may be the reason I didn't bring over this piece of the docs initially, as it inevitably brings in a leptos dependency, whereas reactive_graph is supposed to be a much more general-purpose and independent crate. Maybe this discussion should be moved somewhere else in Leptos docs or in the book. I don't have a great answer.

@agraboso
Copy link
Contributor Author

That makes sense. Maybe the best place for it is chapter 8 of the book, in the section titled Option #2: Passing Signals through Context (with some modifications to adapt it to the narrative there).

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