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

Obsolete "register" in fullstack docs #262

Open
ochrons opened this issue Apr 22, 2024 · 1 comment
Open

Obsolete "register" in fullstack docs #262

ochrons opened this issue Apr 22, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation fullstack related to the fullstack crate

Comments

@ochrons
Copy link

ochrons commented Apr 22, 2024

In https://dioxuslabs.com/learn/0.5/reference/fullstack/server_functions it says

You must call register on the type you passed into the server macro in your main function before starting your server to tell Dioxus about the server function

but to my understanding this is no longer a requirement, and this text should therefore be removed.

I believe also this is obsolete (wrt to the unique type requirement)

To make a server function, simply add the #[server(YourUniqueType)] attribute to a function.

There is also a section "Server code" at the end that uses these, but it's unclear if this is also obsolete or needed in some use-cases?

@ealmloff ealmloff added documentation Improvements or additions to documentation fullstack related to the fullstack crate labels Apr 22, 2024
@ealmloff
Copy link
Member

The register function is not needed on most platforms, but it is still required if you are running your server with WASM. It should be moved to a note

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 fullstack related to the fullstack crate
Projects
None yet
Development

No branches or pull requests

2 participants