Skip to content

Commit

Permalink
Remove batchedUpdates call as it's now a noop
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-sherman committed Apr 15, 2024
1 parent 72fc901 commit e1ac9e8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/hooks/use-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,7 @@ const useInput = (inputHandler: Handler, options: Options = {}) => {

// If app is not supposed to exit on Ctrl+C, then let input listener handle it
if (!(input === 'c' && key.ctrl) || !internal_exitOnCtrlC) {
// @ts-expect-error TypeScript types for `batchedUpdates` require an argument, but React's codebase doesn't provide it and it works without it as exepected.
reconciler.batchedUpdates(() => {
inputHandler(input, key);
});
inputHandler(input, key);
}
};

Expand Down

0 comments on commit e1ac9e8

Please sign in to comment.