grapp-dev / stacks

A set of components for building layouts in React Native. Powered by React Native Unistyles.
https://stacks.grapp.dev
MIT License
982 stars 24 forks source link

What about "stretch"? #3

Closed gfpacheco closed 4 years ago

gfpacheco commented 4 years ago

First of all: nice work, I'm considering using Stacks, I'm still a bit concerned with cloning every child all the time though.

Any particular reason why you don't support the stretch alignment?

I mean, it's the default alignment in ReactNative and you don't even have it as an option.

mobily commented 4 years ago

@gfpacheco

Any particular reason why you don't support the stretch alignment?

nice catch! thank you, I totally forgot about that 😅 stretch is the default value now, so it's consistent with RN default value of alignItems property https://github.com/mobily/stacks/blob/9f607271fb41b6f862a62e5ea8f1a4e5d56f1af2/src/utils.ts#L160

the docs have been updated as well (wherever it was necessary) https://mobily.github.io/stacks/docs/stack#align https://mobily.github.io/stacks/docs/columns#aligny https://mobily.github.io/stacks/docs/box#alignx

I'm still a bit concerned with cloning every child

I will try to provide some benchmarks :)

gfpacheco commented 4 years ago

Cool, I'll close this issue when there's a new version published

mobily commented 4 years ago

@gfpacheco I've already sent a new version 0.6.0 to npm, feel free to test it :)