1. Axois post
export const AxiosPost = async (보내는 값) => { try { const res = await axios.post(URL,보내는 값); return res; } catch (err) { console.error(err) } };
2. React-Query
const { mutate, isLoading } = useMutation(AxiosPost, { onError: (err) => alert("신청서 등록에 실패하였습니다."), onSuccess: () => { navigate("/page"); }, });
3. Button Event(ex)
const FE = (e: React.MouseEvent<HTMLButtonElement>) => { mutate({ id: id, password: password }); };