schiehll / react-alert

alerts for React
MIT License
607 stars 99 forks source link

How to use Provider without hook? #141

Closed icharge closed 5 years ago

icharge commented 5 years ago

I'm not using hook and I got this error. image

this is my app code

const render = messages => {
  ReactDOM.render(
    <div>
      <Provider store={store}>
        <MuiThemeProvider theme={material}>
          <View>
            <LanguageProvider messages={messages}>
              <AlertProvider template={AlertDialog}>
                <ConnectedRouter history={history}>
                  <App />
                </ConnectedRouter>
              </AlertProvider>
            </LanguageProvider>
          </View>
        </MuiThemeProvider>
      </Provider>

    </div>,
    MOUNT_NODE,
  );
};
schiehll commented 5 years ago

You probably have two different versions of React installed in your node_modules.

Take a look at this issue: https://github.com/facebook/react/issues/13991