Update 24_hydration_bugs.md (#207)

Remove reference to deprecated `create_effect` function in favor of `Effect`.
This commit is contained in:
bicarlsen
2025-06-13 17:09:25 +02:00
committed by GitHub
parent 66ff9267c4
commit f338c73cb0

View File

@@ -241,6 +241,6 @@ WebAssembly running in the browser is a pretty limited environment. You dont
In particular, youll sometimes see errors about the crate `mio` or missing things from `core`. This is generally a sign that you are trying to compile something to WASM that cant be compiled to WASM. If youre adding server-only dependencies, youll want to mark them `optional = true` in your `Cargo.toml` and then enable them in the `ssr` feature definition. (Check out one of the template `Cargo.toml` files to see more details.)
You can use `create_effect` to specify that something should only run on the client, and not in the server. Is there a way to specify that something should run only on the server, and not the client?
You can create an [`Effect`](https://docs.rs/leptos/latest/leptos/prelude/struct.Effect.html) to specify that something should only run on the client, and not on the server. Is there a way to specify that something should run only on the server, and not the client?
In fact, there is. The next chapter will cover the topic of server functions in some detail. (In the meantime, you can check out their docs [here](https://docs.rs/leptos/latest/leptos/attr.server.html).)