| 1 | /** |
| 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. |
| 3 | * |
| 4 | * This source code is licensed under the MIT license found in the |
| 5 | * LICENSE file in the root directory of this source tree. |
| 6 | */ |
| 7 | |
| 8 | /* This file is used to test the effect auto-deps configuration, which |
| 9 | * allows you to specify functions that should have dependencies added to |
| 10 | * callsites. |
| 11 | */ |
| 12 | import {useEffect} from 'react'; |
| 13 | |
| 14 | export default function useEffectWrapper(f: () => void | (() => void)): void { |
| 15 | useEffect(() => { |
| 16 | f(); |
| 17 | }, [f]); |
| 18 | } |