Skip to content
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

뒤로 가기를 router 패키지에 추가 #1821

Open
Tracked by #1823
giwan-dev opened this issue Jan 7, 2022 · 3 comments
Open
Tracked by #1823

뒤로 가기를 router 패키지에 추가 #1821

giwan-dev opened this issue Jan 7, 2022 · 3 comments
Labels
good first issue Good for newcomers

Comments

@giwan-dev
Copy link
Contributor

뒤로가기 또한 라우팅의 중요한 도메인입니다.
react-contexts에서 라우팅 로직을 완전히 제거하기 위해 뒤로 가기 관련 코드를 router 패키지에 추가해야합니다.

@giwan-dev
Copy link
Contributor Author

@giwan-dev
Copy link
Contributor Author

해결해야하는 것들

  1. 뒤로 가기에 backOrClose를 포함할 것인가? 앱에서 뒤로 가다가 더이상 갈 수 없을 때 자동으로 창을 닫을 수도 있고, 그냥 아무 행동을 하지 않을 수 있습니다.
  2. asyncBack의 대체재 마련. asyncBack은 주로 모달을 닫은 다음 비동기로 특정 작업을 수행하려 할 때 사용합니다. 히스토리 조작하는 코드를 숨긴 모달 context를 만들어야 asyncBack을 완전히 대체할 수 있습니다.

@inbeom inbeom added the good first issue Good for newcomers label Mar 16, 2022
@inbeom
Copy link
Contributor

inbeom commented Mar 16, 2022

해결해야하는 것들

  1. 뒤로 가기에 backOrClose를 포함할 것인가? 앱에서 뒤로 가다가 더이상 갈 수 없을 때 자동으로 창을 닫을 수도 있고, 그냥 아무 행동을 하지 않을 수 있습니다.
  2. asyncBack의 대체재 마련. asyncBack은 주로 모달을 닫은 다음 비동기로 특정 작업을 수행하려 할 때 사용합니다. 히스토리 조작하는 코드를 숨긴 모달 context를 만들어야 asyncBack을 완전히 대체할 수 있습니다.
  1. backOrClose를 기본으로 해도 괜찮을 것 같습니다. Opt-out할 수 있는 인자를 제공하는 걸로 생각해도 되겠어요. 평소엔 back()으로 쓰고, 창이 닫히지 않는 뒤로가기가 필요하면 back({ preventClosingClientWindow: true }) 형식으로 쓸 수 있다면 좋겠습니다.
  2. 자칫 잘못하면 이 이슈의 범위를 벗어날 것 같은데, Modal 컴포넌트 개선방안 논의 #1879 에서 이어가면 좋을 듯합니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants