2017-05-16 4 views
0

Expo를 사용하여 React-native 앱의 템플릿 빌드를 초기화 한 후 redux를 포함한 내 자신의 템플릿을 추가하기 시작했습니다.React-native (expo) - 잘못된 유형

Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in. 

Check your code at App.js:10. 
    in Unknown (created by AwakeInDevApp) 
    in RCTView (at View.js:514) 
    in View (created by AwakeInDevApp) 
    in AwakeInDevApp (at registerRootComponent.js:21) 
    in ExponentRootComponent (at renderApplication.js:35) 
    in RCTView (at View.js:514) 
    in View (at AppContainer.js:93) 
    in RCTView (at View.js:514) 
    in View (at AppContainer.js:92) 
    in AppContainer (at renderApplication.js:34) 
reactConsoleErrorHandler @ crna-entry.bundle:6725 
newConsoleFunc @ crna-entry.bundle:52943 
console.error @ crna-entry.bundle:36227 
printWarning @ crna-entry.bundle:3015 
warning @ crna-entry.bundle:3036 
createElement @ crna-entry.bundle:17021 
exports.default @ crna-entry.bundle:81790 
(anonymous) @ crna-entry.bundle:21644 
measureLifeCyclePerf @ crna-entry.bundle:21459 
_constructComponentWithoutOwner @ crna-entry.bundle:21643 
_constructComponent @ crna-entry.bundle:21620 
mountComponent @ crna-entry.bundle:21513 
mountComponent @ crna-entry.bundle:17847 
mountChildren @ crna-entry.bundle:21043 
initializeChildren @ crna-entry.bundle:20502 
mountComponent @ crna-entry.bundle:20562 
mountComponent @ crna-entry.bundle:17847 
performInitialMount @ crna-entry.bundle:21686 
mountComponent @ crna-entry.bundle:21590 
mountComponent @ crna-entry.bundle:17847 
performInitialMount @ crna-entry.bundle:21686 
mountComponent @ crna-entry.bundle:21590 
mountComponent @ crna-entry.bundle:17847 
performInitialMount @ crna-entry.bundle:21686 
mountComponent @ crna-entry.bundle:21590 
mountComponent @ crna-entry.bundle:17847 
mountChildren @ crna-entry.bundle:21043 
initializeChildren @ crna-entry.bundle:20502 
mountComponent @ crna-entry.bundle:20562 
mountComponent @ crna-entry.bundle:17847 
performInitialMount @ crna-entry.bundle:21686 
mountComponent @ crna-entry.bundle:21590 
mountComponent @ crna-entry.bundle:17847 
mountChildren @ crna-entry.bundle:21043 
initializeChildren @ crna-entry.bundle:20502 
mountComponent @ crna-entry.bundle:20562 
mountComponent @ crna-entry.bundle:17847 
performInitialMount @ crna-entry.bundle:21686 
mountComponent @ crna-entry.bundle:21590 
mountComponent @ crna-entry.bundle:17847 
performInitialMount @ crna-entry.bundle:21686 
mountComponent @ crna-entry.bundle:21590 
mountComponent @ crna-entry.bundle:17847 
performInitialMount @ crna-entry.bundle:21686 
mountComponent @ crna-entry.bundle:21590 
mountComponent @ crna-entry.bundle:17847 
mountComponentIntoNode @ crna-entry.bundle:22829 
perform @ crna-entry.bundle:18133 
batchedMountComponentIntoNode @ crna-entry.bundle:22836 
perform @ crna-entry.bundle:18133 
batchedUpdates @ crna-entry.bundle:17658 
batchedUpdates @ crna-entry.bundle:17727 
renderComponent @ crna-entry.bundle:22881 
render @ crna-entry.bundle:6353 
renderApplication @ crna-entry.bundle:49001 
run @ crna-entry.bundle:48790 
runApplication @ crna-entry.bundle:48830 
__callFunction @ crna-entry.bundle:3451 
(anonymous) @ crna-entry.bundle:3322 
guard @ crna-entry.bundle:3286 
callFunctionReturnFlushedQueue @ crna-entry.bundle:3321 
(anonymous) @ debuggerWorker.js:71 
crna-entry.bundle:6717 Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in. 

Check the render method of `StatelessComponent`. 
handleException @ crna-entry.bundle:6717 
handleError @ crna-entry.bundle:6577 
reportFatalError @ crna-entry.bundle:683 
guard @ crna-entry.bundle:3288 
callFunctionReturnFlushedQueue @ crna-entry.bundle:3321 
(anonymous) @ debuggerWorker.js:71 
crna-entry.bundle:52943 Remote debugger is in a background tab which may cause apps to perform slowly. Fix this by foregrounding the tab (or opening it in a separate window). 
newConsoleFunc @ crna-entry.bundle:52943 
console.warn @ crna-entry.bundle:36235 
(anonymous) @ debuggerWorker.js:25 
(anonymous) @ debuggerWorker.js:53 

App.js은 다음과 같습니다 :

import React from 'react'; 
import Provider from 'react-redux'; 
import HomeScreen from './components/HomeScreen'; 
import createStore from './createStore'; 

const store = createStore(); 

export default() => (
    <Provider store={store}> 
    <HomeScreen /> 
    </Provider> 
); 

을 그리고 전체 코드 : 그것은 (원격 디버그 창에서) 다음 오류를 반환 https://github.com/wastelandtime/rpgame

은 알려 주시기 바랍니다.

답변

1

App.js에서 제공자를 기본 모듈로 가져 오지만 실제로는 내보내기로 이름이 지정됩니다.

그래서, 그것 뿐이다

import { Provider } from 'react-redux';

+0

로 변경합니다. 고맙습니다. 나는 그것을 어떻게 놓쳤는 지 모른다. – Wasteland