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

[Refactor][온보딩] 스크린 전체를 ScrollView로 감싸는 방안(예시) #46

Merged
merged 2 commits into from
Oct 6, 2022

Conversation

watchiswatch
Copy link
Collaborator

@watchiswatch watchiswatch commented Oct 4, 2022

Refactor

  • 를 parent container로 사용할때는, 스타일을 줄 때 style prop이 아닌, contentContainerStyle prop을 통해 준다. 이때 이 안에는 { flex : 1 } 은 빠져야 한다.(스크롤을 내려도 위로 다시 돌아가는 bounce현상이 발생함), 대신 { flexGrow : 1 }을 추가하면 잘 작동한다.
    // contentContainerStyle : These styles will be applied to the scroll view content container which wraps all of the child views
  • 참조 link / https://medium.com/@peterpme/taming-react-natives-scrollview-with-flex-144e6ff76c08

@watchiswatch watchiswatch self-assigned this Oct 4, 2022
@akdlsz21
Copy link
Collaborator

akdlsz21 commented Oct 5, 2022

제 글쓰기 컴포넌트가 계속 위로 튕겨졌던 이유가 혹시 flexGrow를 쓰지 않아서일까요?

@watchiswatch watchiswatch merged commit e6054ea into main Oct 6, 2022
@watchiswatch watchiswatch deleted the Refactor/ScrollView_wrapping branch October 6, 2022 11:46
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.

2 participants