docsite icon indicating copy to clipboard operation
docsite copied to clipboard

Obsolete "register" in fullstack docs

Open ochrons opened this issue 1 year ago • 1 comments

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?

ochrons avatar Apr 22 '24 09:04 ochrons

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

ealmloff avatar Apr 22 '24 15:04 ealmloff