I checked the blockWidth that is set in the state of each block and seems like this is the same for most of the blocks. The blockWidth is different only for nested blocks like Column, Button etc. I’m wondering if we could measure the width at the top and then pass it to the bottom by a prop. Then set the passed value from props as a default value in state and set the width one more time only if the value in onLayout is different. I also found that we do the same inside the block.native.js which is a child of block-list-item.
Please check block.native.js and block-list-item.native.js
I checked the
blockWidththat is set in the state of each block and seems like this is the same for most of the blocks. TheblockWidthis different only for nested blocks like Column, Button etc. I’m wondering if we could measure the width at the top and then pass it to the bottom by a prop. Then set the passed value from props as a default value in state and set the width one more time only if the value in onLayout is different. I also found that we do the same inside the block.native.js which is a child of block-list-item.Please check block.native.js and block-list-item.native.js