2017-06-24 20 views
0

我下面的終極版的教程,並試圖包括Provider我使用JSbin「的ReferenceError:ReactRedux沒有定義

我的HTML:

<!DOCTYPE html> 
<html> 
<head> 
    <meta charset="utf-8"> 
    <meta name="viewport" content="width=device-width"> 
    <script scr="https://cdnjs.cloudflare.com/ajax/libs/react-redux/5.0.5/react-redux.js"></script> 
    <script src="https://cdnjs.cloudflare.com/ajax/libs/redux/3.6.0/redux.js"></script> 
    <script src="https://wzrd.in/standalone/[email protected]"></script> 
    <script src="https://wzrd.in/standalone/[email protected]"></script> 
    <title>JS Bin</title> 
    <script src="https://fb/react-0.14.3.js"></script> 
    <script src="https://fb/react-dom-0.14.3.js"></script> 

</head> 
<body> 
    <div id='root'></div> 
</body> 
</html> 

JS文件:

const { Provider } = ReactRedux; 

但是我得到的錯誤:

"ReferenceError: ReactRedux is not defined 

我在做什麼錯?

+0

這只是一個錯字('scr',而不是'src'),投票關閉的錯字。 –

回答

1

在您發佈的代碼段中,您有scr而不是src

<script scr="https://cdnjs.cloudflare.com/ajax/libs/react-redux/5.0.5/react-redux.js"></script> 

應該

<script src="https://cdnjs.cloudflare.com/ajax/libs/react-redux/5.0.5/react-redux.js"></script> 
+1

啊好眼力。謝謝!會接受,如果我能 –

+0

錯字的問題應該得到意見和(當你可以)近距離票,而不是答案。 –