DioxusLabs / docsite

Dioxuslabs.com documentation site
https://dioxuslabs.com
126 stars 108 forks source link

Obsolete "register" in fullstack docs #262

Open ochrons opened 6 months ago

ochrons commented 6 months ago

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 commented 6 months ago

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