Skip to content

Remove argument from use_hook closure#496

Merged
jkelleyrtp merged 1 commit into
DioxusLabs:masterfrom
rMazeiks:plain_use_hook
Jul 11, 2022
Merged

Remove argument from use_hook closure#496
jkelleyrtp merged 1 commit into
DioxusLabs:masterfrom
rMazeiks:plain_use_hook

Conversation

@rMazeiks

Copy link
Copy Markdown
Contributor

This is a breaking change.


Alternative: we could make use_hook take a trait impl UseHookFn, and implement it for both ()->T and (usize)->T, and deprecate the latter, but breaking it seems better:

  • There is no valid use case for the argument
  • It's an easy change (find + replace)
  • Neat function signature -> docs quick to understand
  • There wouldn't be a good mechanism to make this deprecation show up as a warning

Also; update docs for said function
@jkelleyrtp jkelleyrtp merged commit d734dc5 into DioxusLabs:master Jul 11, 2022
@jkelleyrtp jkelleyrtp added the breaking This is a breaking change label Jul 11, 2022
sahina pushed a commit to sahina/dioxus that referenced this pull request Jul 19, 2022
Also; update docs for said function
ealmloff added a commit that referenced this pull request Sep 5, 2022
* minor formatting

* Internationalization: move guide to en folder and preserve its history. (#494)

* chore: move guide to en folder

* docs: add english as language

* merged conf resolved

* chore: remove outdated docs

* chore: use taffy dimension directly

* Add PT-BR translations (#456)

* Translate final.md, hello_world.md, README.md, ROADMAP.md and SUMMARY.md

* Translatation complete

* Internationalization: move guide to en folder and preserve its history. (#494)

* Clean files and build mdBook with localization feature

* Rebase, remove leftovers and check book builds for every language: ✅

Co-authored-by: Jon Kelley <jkelleyrtp@gmail.com>

* Remove argument from `use_hook` closure (#496)

Also; update docs for said function

* chore: prevent reference from being uploaded

Co-authored-by: Altug Sahin <altugsahin@gmail.com>
Co-authored-by: Jon Kelley <jkelleyrtp@gmail.com>
Co-authored-by: Breno Rocha <66398400+amindWalker@users.noreply.github.com>
Co-authored-by: Reinis Mazeiks <rMazeiks@users.noreply.github.com>
Co-authored-by: = <evanalmloff@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking This is a breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants