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

Add examples for LaunchBuilder methods #3629

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

vishwamartur
Copy link
Contributor

Related to #3530

Add examples for with_cfg, with_context, and with_context_provider methods in the LaunchBuilder documentation.

  • with_context_provider: Add an example demonstrating how to inject state into the root component's context created on the thread that the app is launched on.
  • with_context: Add an example demonstrating how to inject state into the root component's context.
  • with_cfg: Add an example demonstrating how to provide a platform-specific config to the builder.

Related to DioxusLabs#3530

Add examples for `with_cfg`, `with_context`, and `with_context_provider` methods in the `LaunchBuilder` documentation.

* **with_context_provider**: Add an example demonstrating how to inject state into the root component's context created on the thread that the app is launched on.
* **with_context**: Add an example demonstrating how to inject state into the root component's context.
* **with_cfg**: Add an example demonstrating how to provide a platform-specific config to the builder.
@vishwamartur vishwamartur requested a review from a team as a code owner January 22, 2025 17:17
@ealmloff ealmloff added the documentation Improvements or additions to documentation label Jan 22, 2025
Copy link
Member

@jkelleyrtp jkelleyrtp left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Much nicer

@jkelleyrtp jkelleyrtp merged commit 2fd7684 into DioxusLabs:main Jan 31, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants