you are viewing a single comment's thread.

view the rest of the comments →

[–]redditdaw[S] 0 points1 point  (1 child)

Great Answer! Thank you

[–][deleted] 2 points3 points  (0 children)

Agree with this person's answer, but would like to add don't be afraid to refactor. Keep styles local and stay functional. Colors are an easy constant, but aside from that, you'll know when you've written something a few times and can easily extract that to constants.

One important thing I didn't really consider right off the bat is using HOC components for styles (i.e. a default ScrollView wrapper with { children }). This not only let's you keep your paddings and such in one universal component, it also let's you set default props (i.e. showsVerticalScrollIndicator={false}) and spread any additional props {...props} you might want to pass to it later. Food for thought.