Skip to content

Commit

Permalink
remove single execution mechanism for web
Browse files Browse the repository at this point in the history
  • Loading branch information
getusha committed Oct 6, 2023
1 parent 68b64c5 commit 0551c8b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/hooks/useSingleExecution/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { useCallback } from 'react';

/**
* This hook was specifically written for native issue
* more information: https://github.com/Expensify/App/pull/24614 https://github.com/Expensify/App/pull/24173
* on web we don't need this mechanism so we just call the action directly.
*
* @returns {Object}
*/
export default function useSingleExecution() {
const singleExecution = useCallback(
(action) =>
(...params) => {
action(...params);
},
[],
);

return { isExecuting: false, singleExecution };
}
File renamed without changes.

0 comments on commit 0551c8b

Please sign in to comment.