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

[Feat/#49] 네이티브 핸들러 추가 #53

Merged
merged 4 commits into from
Feb 7, 2025
Merged

[Feat/#49] 네이티브 핸들러 추가 #53

merged 4 commits into from
Feb 7, 2025

Conversation

sikkzz
Copy link
Collaborator

@sikkzz sikkzz commented Feb 6, 2025

💡 변경사항 & 이슈

네이티브 통신 핸들러 연결

✍️ 관련 설명

openCamera, openGallery, share, copy, createReview 핸들러 전부 연결 했어

이게 페이지 단위로 구성해서 결국 createReview 데이터 전달 과정에서 전역 store가 필요할 수 밖에 없더라구?

context, zustand, useSyncExternalStore 이렇게 3개정도를 고려해봤는데 각각의 장단점과 특징이 있어

  • useSyncExternalStore은 외부 store 구독에 용이해서 우리 상황과는 안맞음
  • context는 라이브러리 설치가 필요 없다는 장점과 코드가 조금 복잡해지는 단점
  • zustand는 코드가 단순하고 store 관리도 쉽다는 장점과 라이브러리 설치로 번들 사이즈가 증가하는 단점

결론적으로는 zustand를 선택했는데 번들 사이즈 1kb라 적었고 코드가 context보다 간단하게 관리할 수 있어서 사용하기로 결정한 거 같아

혹시 다른 의견이 있거나 더 나은 점이 있다면 알려줘!

이외의 기능 테스트는 네이티브 배포가 들어가야 확인 가능할 듯!

⭐️ Review point

  • 전역 상태관리 관련 의견
  • 이외 코드 개선점

📷 Demo

.

@sikkzz sikkzz added the Feature new feature label Feb 6, 2025
@sikkzz sikkzz self-assigned this Feb 6, 2025
@sikkzz sikkzz requested a review from lgrin-byte as a code owner February 6, 2025 12:02
@sikkzz sikkzz linked an issue Feb 6, 2025 that may be closed by this pull request
1 task
Copy link
Member

@lgrin-byte lgrin-byte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zustand 좋은 것 같애 굳굳 수고 넘 많었다!!

src/components/ReceiptEdit/ReceiptEdit.tsx Show resolved Hide resolved
@sikkzz sikkzz merged commit dea2ba5 into develop Feb 7, 2025
1 check passed
@sikkzz sikkzz deleted the feat/#49 branch February 7, 2025 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] 네이티브 핸들러 추가
2 participants