Invalid prop/context `relay`

587 views Asked by At

I did a fresh npm install and suddenly am getting the following error

warning.js?8a56:44 Warning: Failed context type: Invalid prop/context relay supplied to Relay(FilesPage), expected undefined to be an object conforming to the RelayEnvironment interface.
    in Relay(FilesPage) (created by RouterContext)
    in div (created by Row)
    in Row (created by Column)
    in Column (created by App)
    in div (created by StyleRoot)
    in StyleRoot (created by App)
    in Provider (created by App)
    in App (created by AppWithStore)
    in Provider (created by AppWithStore)
    in AppWithStore (created by RouterContext)
    in RouterContext (created by Router)
    in Router (created by Root)
    in Root

This is my root container

const Root = () => (
  <Provider store={store}>
    <Router
      history={browserHistory}
      routes={routes}
      onReadyStateChange={readyState => {
        console.log(99, readyState)
        if (!readyState.done) store.dispatch(toggleLoading(true))
        else store.dispatch(toggleLoading(false))
      }}
      render={applyRouterMiddleware(useRelay)}
      environment={Relay.Store}
    />
  </Provider>
)
0

There are 0 answers