Skip to content

Warning: Each child in a list should have a unique "key" prop. #165

@Quantmatic

Description

@Quantmatic

Setup (always fill this in):

Describe the bug
Following the guide you got here:

Get a keyProp error dump

Warning: Each child in a list should have a unique "key" prop.

Check the top-level render call using <Text>. See https://fb.me/react-warning-keys for more information.
    in Text
    in Unknown (created by Activity)
    in RCTView (at View.js:34)
    in View (at createAnimatedComponent.js:165)
    in AnimatedComponent (at createAnimatedComponent.js:215)
    in ForwardRef(AnimatedComponentWrapper) (at TouchableOpacity.js:223)
    in TouchableOpacity (at TouchableOpacity.js:301)
    in ForwardRef (created by Activity)
    in Activity (at App.tsx:15)

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://github.com/Quantmatic/getstream_feed.git'
  2. git clone https://github.com/Quantmatic/getstream_feed.git
  3. yarn install
  4. yarn start
  5. expo open ios emulator

Expected behavior
No key prop error
The props that are passed to the components should have a unique key prop

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context

const CustomActivity = (props) => {
  return (
    <Activity
      {...props}
      Footer={
        <LikeButton {...props} />
      }
    />
  );
};

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