Skip to content

[Performance] blockWidth in block and block-list-item #2962

@dratwas

Description

@dratwas

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions