mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
After this is merged, I'll add it to .git-blame-ignore-revs. I can't do
it now as the hash will change after ghstack lands this stack.
ghstack-source-id: 054ca869b7
Pull Request resolved: https://github.com/facebook/react/pull/29214
14 lines
372 B
TypeScript
14 lines
372 B
TypeScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
import type { EffectCallback } from "react";
|
|
import { useEffect } from "react";
|
|
|
|
export default function useMountEffect(effect: EffectCallback) {
|
|
return useEffect(effect, []);
|
|
}
|