[Events] Cross references to use_effect_with_deps (#2486)

Figuring out how to use manual event listening with Function Components
took me a while. The new docs already contain a great example!

I add a small cross reference here to make it more discoverable.

Co-authored-by: Peter Kolloch <peter.kolloch@nexxiot.com>
This commit is contained in:
Peter Kolloch 2022-03-03 16:40:01 +01:00 committed by GitHub
parent 68859ce13e
commit 451227fe5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -694,3 +694,7 @@ which will remove the event listener from the element.
For more information on `EventListener`, see the
[gloo_events docs.rs](https://docs.rs/gloo-events/0.1.1/gloo_events/struct.EventListener.html).
## Using EventListener in a Function Component
See [Applying event listeners to the DOM](./function-components/hooks/use-effect#applying-event-listeners-to-the-dom).