forked from zulip/zulip-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
usePrevious [nfc]: Default to
null
on first render.
As Greg pointed out a few weeks ago [1], `usePrevious` has had a "funny quirk where on the first call, it takes the "previous" value to be the current one." Instead, let the caller decide what the value should be on the first render, or just have it be `null` if the caller is fine with that. [1] zulip#4914 (comment)
- Loading branch information
1 parent
58f7159
commit 3fba6a5
Showing
3 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters