Skip to content

warning.js:36 Warning: ComposedBlock: key is not a prop. Trying to access it will result in undefined being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props) #12

@xnightsky

Description

@xnightsky
warning.js:36 Warning: ComposedBlock: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)

not support restProps

const {  a,  b, ...restProps } = this.props;

I can not set attr key

render () {
     const data = ['a', 'b', 'c'];
     return (
         <Block layout>
             {
                  data.map((idata, index) => {
                      return (<Block key={`block-${index}`}></Block>);
                  })
             }
         </Block>
     );
}

versions:

    "prop-types": "^15.5.8",
    "react": "^15.4.1",
    "react-addons-update": "^15.4.0",
    "react-blocks": "^1.1.4",
    "react-dom": "^15.4.1",
    "react-router": "^2.4.0",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions