raspiblitz-web
raspiblitz-web copied to clipboard
Update react-toastify: 9.0.8 → 9.1.1 (minor)
Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.
What changed?
✳️ react-toastify (9.0.8 → 9.1.1) · Repo
Release Notes
9.1.0
Release notes
🚀 Features
toast.promise
let you typedata
for each state. This is useful when rendering something based on the response.For example:
interface Success { username: string }interface Error { err: string }
toast.promise<Success,Error>(myPromise, { success: { render({ data }) { return data.username; } }, error: { render({ data }) { return data.err; } } })
toast.update
accepts a generic as well to specify the data typeinterface TData { username: string }toast.update<TData>(id, { data: payload, render({ data }) { return
hello <span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">data</span><span class="pl-kos">.</span><span class="pl-c1">username</span><span class="pl-kos">}</span></span>
} })
🕷 Bugfixes
- fix progress countdown stops on mobile #580
- prevent clash with ios native gesture #397
- fix toast when a word is too long #864
- fix missing types declarations in exports #843
- fix
toast.done
not dismissing toast #853- fix cursor when close on click is false #839
🚨 Deprecated APIAdded deprecation notice for the API below. They will be removed in the next major release
API Why Alternative onClick
Not used that much, it's increasing the API surface for nothing Can easily be implemented in userland. Just render a react component and attach the handler to it. toast(<div onClick={doSomething}>hello</div>)
onOpen
Does not play well with useEffect
behavior in react18 (runs twice in dev mode) see #741A better approach is to use toast.onChange
see https://fkhadra.github.io/react-toastify/listen-for-changes/onClose
Does not play well with useEffect
behavior in react18 (runs twice in dev mode) see #741A better approach is to use toast.onChange
see https://fkhadra.github.io/react-toastify/listen-for-changes/toast.POSITION
Reduce bundle size :) Thanks to typescript, we now have autocomplete toast.TYPE
Reduce bundle size :) Thanks to typescript, we now have autocomplete
⚙️ Chore
- bump dependencies
- refactor internal
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 32 commits:
9.1.1
fix style not applied properly #870
9.1.0
allow to specify TData for update
clean a bit
deprecate onClick
remove isNil util
remove excessive validation
Revert "alias requestAnimationFrame"
shorten declaration
alias requestAnimationFrame
update deprecation notices
fix test helpers
test closeOnClick
fix cursor when close on click is false
remove dist folder from coverage
WIP type update
bump browser list
bump dependencies
add typing to addon and revert compress
update id generation
refactor validator
cleaning
add deprecation notice
fix toast.done #853
fix missing types declarations in exports:
fix toast when a word is too long
Revert "add deprecation notice for v10"
prevent clash with ios native gestion #397
fix progress bar stops on mobile #580
add deprecation notice for v10
fix module resolution NodeNext #843
Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase
.
All Depfu comment commands
- @depfu rebase
- Rebases against your default branch and redoes this update
- @depfu recreate
- Recreates this PR, overwriting any edits that you've made to it
- @depfu merge
- Merges this PR once your tests are passing and conflicts are resolved
- @depfu close
- Closes this PR and deletes the branch
- @depfu reopen
- Restores the branch and reopens this PR (if it's closed)
- @depfu pause
- Ignores all future updates for this dependency and closes this PR
- @depfu pause [minor|major]
- Ignores all future minor/major updates for this dependency and closes this PR
- @depfu resume
- Future versions of this dependency will create PRs again (leaves this PR as is)