DioxusLabs / DioxusLabs/docsite

Improve documentation for realistic full-stack apps

Open
#253 2 comments 4 reactions 0 assignees View on GitHub
documentation fullstack
Dominant language
Rust
Stars
206
Forks
208
Avg merge
1h 11m
Merged PRs (30d)
3

Description

Any realistic web app will have things like database connections, or calling other services on the server side. Due to Dioxus "hijacking" the `main` function and sharing it with browser and backend code, it's not easy to see how one would create database connection pools or RPC clients. Any documentation from `axum` or `tokio` is not very useful, with the way the `main` is setup in Dioxus.

Second problem is how to pass these DB pools or RPC clients to Dioxus server functions, so that they can be used to fetch data from external services. This should be possible via Axum's State mechanism, but since we're not dealing with Axum directly, this needs to be properly documented with good examples.

Right now the only somewhat related example is the [auth example](https://github.com/dioxuslabs/dioxus/blob/main/packages/fullstack/examples/axum-auth/src/main.rs), but even that is not really documented at all.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.