When I apply {alignItems: 'center', justifyContent: 'center'}
to style
prop, got following error,
ScrollView child layout must be applied through the contentContainerStyle prop
then applied same styling to contentContainerStyle
and worked fine. I am unable to understand the basic difference between style
and contentContainerStyle
and when to use them.
I am assuming that when ScrollView
is called, two views
are called. style
applicable to parent View
and contentContainerStyle
applicable to child View
.
Please correct me if I am wrong. Thanks.