Apologies if this is a little pedantic, but the first table in 6.2 lists getInitialState and getDefaultProps thus :
getInitialState Object containing initial value of this.state
getDefaultProps Object containing values to be set on this.props
To my reading the table suggests that they are objects, rather than functions that return objects.
It's quite clear on further reading that they are functions (as indeed their name would suggest), but possibly if you were very new to react and reading this book it might prove slightly confusing?
It's just a small thing, and quite possibly subject to my own interpretation of how it reads, but maybe you might want to have a quick look at it?
Apologies if this is a little pedantic, but the first table in 6.2 lists getInitialState and getDefaultProps thus :
getInitialState Object containing initial value of this.state getDefaultProps Object containing values to be set on this.props
To my reading the table suggests that they are objects, rather than functions that return objects.
It's quite clear on further reading that they are functions (as indeed their name would suggest), but possibly if you were very new to react and reading this book it might prove slightly confusing?
It's just a small thing, and quite possibly subject to my own interpretation of how it reads, but maybe you might want to have a quick look at it?