Skip to content

✨ feat: useUnmount 훅 추가 #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Conversation

Choozii
Copy link
Member

@Choozii Choozii commented Jul 12, 2024

👾 Pull Request

  • 작업명: use-unmount
  • 상태:신규

1️⃣ Spec

  • 컴포넌트가 unmount 될 때 전달받은 함수를 실행

2️⃣ 변경 사항

3️⃣ 예시 코드

import React, { useState, useCallback } from 'react';
import useUnmount from './useUnmount';

const ExampleComponent = () => {

  useUnmount(() => {
    console.log(`이 함수는 ExampleComponent가 unMount될 때 실행됩니다.`)
  });

  return (
    <div>...</div>
  );
};

export default ExampleComponent;

4️⃣ 관련 문서 (선택 사항)

@Choozii Choozii self-assigned this Jul 12, 2024
@Choozii Choozii closed this Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant