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

feat(examples): add Context API state management example #3657

Merged
merged 2 commits into from
Jan 31, 2025

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!

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