-
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.
[dev-launcher] Improve URL input validation responsiveness (expo#22786)
# Why Closes ENG-7616 # How Improve URL input validation responsiveness by debouncing the `onChangeText` function # Test Plan Run dev-launcher locally through bare-expo <table> <tr><th>iOS</th><th>Android</th></tr> <tr> <td> <video src="https://github.com/expo/expo/assets/11707729/9414318d-fc3a-45e5-b018-9726811ed53d"/> </td> <td> <video src="https://github.com/expo/expo/assets/11707729/b0806be9-0d9b-44e6-b8a7-c42dbaa2b34c" /> </td> </tr> </table> # Checklist <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [ ] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin).
- Loading branch information
1 parent
2d3167e
commit 5a20e3f
Showing
6 changed files
with
32 additions
and
29 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
15 changes: 8 additions & 7 deletions
15
packages/expo-dev-launcher/android/src/debug/assets/expo_dev_launcher_android.bundle
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export function debounce<T>(func: (...args: T[]) => unknown, delay = 200): typeof func { | ||
let timeout: number | NodeJS.Timeout; | ||
return function (...args: T[]) { | ||
clearTimeout(timeout as number); | ||
timeout = setTimeout(() => func(...args), delay); | ||
}; | ||
} |
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
Large diffs are not rendered by default.
Oops, something went wrong.