Skip to content

Conversation

Danish903
Copy link
Contributor

Description

Resolves #3612
Adds a comprehensive example demonstrating Context API with:

  • Cross-component state sharing via use_context_provider/use_context
  • Reactive theme switching using Signals
  • Error handling for missing context providers
  • External CSS styling patterns
  • Platform-agnostic implementation

Changes

+ examples/context_api.rs
+ examples/assets/context_api.css
+ examples/README.md (documentation update)

@Danish903 Danish903 requested a review from a team as a code owner January 27, 2025 21:56
@jkelleyrtp jkelleyrtp merged commit 68ca4c3 into DioxusLabs:main Jan 31, 2025
17 checks passed
@jkelleyrtp
Copy link
Member

Thank you!

AnteDeliria pushed a commit to AnteDeliria/dioxus that referenced this pull request Jun 2, 2025
…3657)

* feat(examples): add Context API state management example (fixes DioxusLabs#3612)

* refactor: code cleanup
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.

Context API example
2 participants