wesbos / Learn-Redux

A simple, single file implementation of Redux for quick learning
201 stars 112 forks source link

Rendering route children #1

Open norbertpy opened 8 years ago

norbertpy commented 8 years ago

First of all thanks for taking time and making these tutorials @wesbos. Using React 15.0.2 I have noticed that if I use:

{ React.cloneElement(this.props.children, this.props) }

As written in Main.js#L14 component I'll get warnings:

key is not a prop. Trying to access it will result in undefined being returned

Instead this will work:

{this.props.children}
bjrmatos commented 8 years ago

same for me

captura de pantalla 2016-05-20 a las 8 31 39 p m
gualopezb commented 8 years ago

@norbertpy @bjrmatos @wesbos Hi guys! I had the same issue, but I realized that it happened because the PhotoGrid.js file was empty. So in the video isn't showed how the component should be built. In order to it works, add the following content to PhotoGrid.js file:

import React from 'react'

const PhotoGrid = React.createClass({
  render() {
    return (
      <div className="photo-grid">
      I'm the photo grid
      </div>
    )
  }
});

export default PhotoGrid