ap0nia / eden-query

🙏 type-safe Elysia.js client with powerful asynchronous state management.
https://ap0nia.github.io/eden-query/
MIT License
23 stars 2 forks source link

Svelte Doc: Confusion/error between useMutation and createMutation #52

Open Extarys opened 2 weeks ago

Extarys commented 2 weeks ago

Eden documentation regarding mutations and the examples provided inside the Git repository differ. The left-side bar says createMutation() (which is the valid method for the svelte-side of things) but the code refers to useMutation.

Doc Appears to be incorrect

https://github.com/ap0nia/eden-query/blob/e45550593389d2968a65233f90e6d6d84729d5f7/documentation/docs/eden-query/svelte/createMutation.md?plain=1#L88

Working demo

https://github.com/ap0nia/eden-query/blob/e45550593389d2968a65233f90e6d6d84729d5f7/examples/eden-svelte-query-basic/src/routes/mutation/%2Bpage.svelte#L6

The React example seems "ok", the doc and the example both refer useMutation method.

ap0nia commented 1 week ago

Oops, bad copy/paste job. Svelte should have the createMutation hook.