tauri-docs icon indicating copy to clipboard operation
tauri-docs copied to clipboard

Rewrite/Improve Events guide

Open FabianLars opened this issue 2 years ago • 2 comments

Also related: #486.

If possible we should look into improving it before the new docs are there. The guide causes too much confusion.

I will try to expand this list every time i see people having issues related to the guide or events.

  • It emits events in the setup hook without some kind of condition. (New) users will therefore often encounter timing issues (emitting events before the js side starts to listen to them)
  • Usage of unlisten() right after listening to it - idk if it's caused by mindless copy-paste but this was a problem in peoples apps wayyy too often.
  • no mention of the need to unlisten in js when something like component unmounting happens.
  • no docs on rust to rust communication -> talking about the trigger methods

FabianLars avatar Mar 08 '23 15:03 FabianLars

Tracking for 2.0, think we're a bit too close to 2.0 for it to be worth fixing in 1.0. Will definitely need to keep these things in mind when writing a guide on events!

simonhyll avatar Sep 15 '23 20:09 simonhyll