2

router.create を使用する react 0.13-router を実行しましたが、1.0.3 は機能しませんでした。この
に示すように、router-react を使用しています。

しかし、私は次のエラーがあります

Warning: React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components).
{ [Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.] name: 'Invariant Violation', framesToPop: 1 }

これは、renderProps へのログを表示するものです

{ routes: 
   [ { childRoutes: [Object] },
     { path: '/',
       component: [Function: BaseAdmin],
       indexRoute: [Object],
       childRoutes: [Object] },
     { component: [Function: Home] } ],
  params: {},
  location: 
   { pathname: '/',
     search: '',
     hash: '',
     state: null,
     action: 'POP',
     key: 'zljum4',
     query: {},
     '$searchBase': { search: '', searchBase: '' } },
  components: [ undefined, [Function: BaseAdmin], [Function: Home] ],
  history: 
   { listenBefore: [Function: listenBefore],
     listen: [Function: listen],
     transitionTo: [Function: transitionTo],
     push: [Function: push],
     replace: [Function: replace],
     go: [Function: go],
     goBack: [Function: goBack],
     goForward: [Function: goForward],
     createKey: [Function: createKey],
     createPath: [Function: createPath],
     createHref: [Function: createHref],
     createLocation: [Function: createLocation],
     setState: [Function: setState],
     registerTransitionHook: [Function: registerTransitionHook],
     unregisterTransitionHook: [Function: unregisterTransitionHook],
     pushState: [Function: pushState],
     replaceState: [Function: replaceState],
     isActive: [Function: isActive],
     match: [Function: match],
     listenBeforeLeavingRoute: [Function: listenBeforeLeavingRoute] } }

使用する簡単な例を教えてください。

4

1 に答える 1