Skip to content

Grid stops working when adding Row Col using child component  #103

@nechmads

Description

@nechmads

If I do something like:
<Grid> <Row> <Col> <Text>1</Text> </Col> </Row> <Row> <Col> <Text>2</Text> </Col> </Row> </Grid>
everything is working fine.

BUT - if I do something like:
<Grid> <MyHeader /> <Row> <Col> <Text>2</Text> </Col> </Row> </Grid>

And MyHeader is:

const MyHeader = () => { return ( <Row> <Col> <Text>1</Text> </Col> </Row> ) }

The grid totally breaks down and the row somehow displayed 20 pixels from the right edge of the screen.
Basically - if you put a Row element through a custom component the grid breaks. Can't understand why...

I use React Native 0.62

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions