3
有沒有人有一個想法可能會導致以下錯誤?TypeError - 需要新語法的React/Redux組件函數
ReactCompositeComponent.js:321 Uncaught TypeError: Failed to construct 'Notification': Please use the 'new' operator, this DOM object constructor cannot be called as a function.
我基本上重新創建反應todoApp的反應,和/終極版爲出發點。通知組件如下:
import React, { PropTypes } from 'react'
const Notification = ({ myProp }) => (
<li>
--My Notification HTML--
</li>
)
Notification.propTypes = {
myProp: PropTypes.string.isRequired,
}
export default Notification
我以前從來沒有遇到這個問題的反應/終極版的應用程序,我到哪裏開始尋找錯誤的根源毫無本事。如果有幫助,我從this腳手架開始,但我已經移除了路由器。我只是需要潛在的原因,儘管如果你能確定確切的問題會更好。如果您需要更多信息,我可以提供。謝謝!