Skip to content

Horizontal Flatlist does not work smoothly #15937

@gokulkulkarni1987

Description

@gokulkulkarni1987

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

  1. react-native -v: react-native: 0.47.2
  2. node -v: v8.4.0
  3. npm -v: 5.4.1
  4. yarn --version: 0.27.5

Then, specify:

  • Target Platform:
    iOS
  • Development Operating System:
    macOS
  • Build tools:
    Atom

Steps to Reproduce

(Write your steps here:)

  1. Write a flatlist, which will place elements side by side rather than one below other, using horizontal attribute.
  2. Provide 3 or more values.

Expected Behavior

The list must scroll horizontally.

Actual Behavior

The app goes horribly unstable and the state keeps on refreshing (render method gets called again and again continuously).

Reproducible Demo

horizontalflatlist

As you can see the logs, there are only 3 records, and the state, of the component, keeps refreshing and hence it does not work smoothly. If I remove horizontal attribute, everything goes fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions