以下是出现错误的信息:Uncaught Invariant Violation: Minified React error #143; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=143 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
查看react官方文档可见:
Error Decoder
In the minified production build of React, we avoid sending down full error messages in order to reduce the number of bytes sent over the wire.
We highly recommend using the development build locally when debugging your app since it tracks additional debug info and provides helpful warnings about potential problems in your apps, but if you encounter an exception while using the production build, this page will reassemble the original text of the error.
The full text of the error you just encountered is:
React.Children.only expected to receive a single React element child.
DocumentTitle 不会被react作为element,故会出现以上错误。
故react中DocumentTitle中不可并行包含多个div标签,当然其它标签也一样。
<DocumentTitle>
<div> </div>
<div> </div>
</DocumentTitle>
上述即是一个错误的例子。