The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

ray@allthisisthat.com (4) [Avatar] Offline
#1
The code listing is missing a line as shown in my code below, and it isn't discussed. Without this line, which I discovered in the online demo, the app doesn't render the 'Comment' element:

var Post = React.createClass({
propTypes: {
user: React.PropTypes.string.isRequired,
content: React.PropTypes.string.isRequired,
id: React.PropTypes.number.isRequired,
},

render: function() {
return (
React.createElement("div", {className: "post"},
React.createElement("h2", {
className: "postAuthor",
id: this.props.id
},
this.props.user,
React.createElement("span", {className: "postBody"},
this.props.content
)
),
this.props.children // this line is missing in the MEAP v03 book
)
); // end of 'return'
} // end render function
}); // end var 'Post'
mark (60) [Avatar] Offline
#2
Author here; thanks for catching this! smilie Working to weed out any possible errors that slip in between the source code and chapters — let me know if you find anything else!