grapp-dev / stacks

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

A lot of undefined styles in styles array #25

Closed erikmueller closed 3 years ago

erikmueller commented 3 years ago

I noticed a lot of undefineds in the style array of the rendered components (e.g. FillView). I have converted a layout to stacks (which makes things much much easier btw 👌 ) and was confused when a snapshot showed a lot of new additions. I then checked the actual rednered output with the RN Debugger and found that Box rendered by the FillView component look like this:

image

It already has a couple of undefineds. When I checked the View that is rendered by the Box I found even more:

image

The source just look like this: <FillView alignY="center">...</FillView>. This is also the case for other components such as Stack.

So I guess my question is: Am I doing something wrong, is this something that does not matter or is something wrong with the way styles are attached/read?

Also: Great work, love the project. Makes things so much more consistent and is a breeze to work with ❤️

mobily commented 3 years ago

@erikmueller 👋 thanks for reporting this problem! I believe it should not affect the performance in the end, but I have removed undefined values in the styles array, just in case! 😉 shipped in v1.1.8 🚢