1
でレンダリング:が反応 - 私はこれをレンダリングしようとしていますmoment.js
<p>Some date: {moment('12-25-1995', 'MM-DD-YYYY')}</p>
となってエラー出力オブジェクトにしようとしたとき、私はこれが一般的であることがわかり
Uncaught Invariant Violation: Objects are not valid as a React child (found: Mon Dec 25 1995 00:00:00 GMT+0100). If you meant to render a collection of children, use an array instead or wrap the object using createFragment(object) from the React add-ons. Check the render method of `MeetingComponent`.
がレスポンスを反応します。
このためのベストプラクティスソリューションは何ですか?
大変ありがとうございます! –
良い答えですが、実際にここで言及したものに加えて、瞬時のコンストラクタ、特に厳密なモードとロケールにはいくつかのオーバーロードがあることに注意してください。 http://momentjs.com/docs/#/parsing/ –