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
お知らせください。
に変更します。ありがとうございました。どのように私はそれを逃したのか分からない。 – Wasteland