export default function useCustomHook(props) {
const { uid } = props;
const someAction = a => {
return uid + a;
};
return {
someAction
};
}
import useCustomHook from "./useCustomHook";
const MyComponent = () => {
const uid = "0";
const { someAction } = useCustomHook(uid);
return (
<div>
{someAction("-hello!")}
</div>
)
};
export default MyComponent;