schiehll / react-alert

alerts for React
MIT License
607 stars 99 forks source link

TypeError: Cannot read properties of undefined (reading 'current') #185

Open CrazyFish159 opened 3 years ago

CrazyFish159 commented 3 years ago

i am just trying to make an alert and i get this error: image image can any one help me?

77Siddharth commented 3 years ago

Even i am Stuck with this. Any possible fixes??

AriaFantom commented 2 years ago

Me too got stuck here -_-

hemmadx commented 2 years ago

Stucked here

DugarRishab commented 2 years ago

Was this issue in v6 or before?

DugarRishab commented 2 years ago

@schiehll please take a look into this issue

wajahatmasood commented 2 years ago

Maybe You didn't define current I do too stuck here.

gonzaaalo commented 1 year ago

It seems to be where you've added the Provider, you should add it above everything. Example:


ReactDOM.render(
  <Provider template={AlertTemplate} {...AlertOptions} >
    <ReduxProvider store={store}>
      <PersistGate loading={null} persistor={persistor}>
        <ThemeProvider theme={theme}>
          <CssBaseline />
          <BrowserRouter >
            <Switch>
              <Route path="/app" render={(props) => <AdminLayout {...props} />} />
              <Redirect from="/" to="/app/start" />
            </Switch>
          </BrowserRouter>
        </ThemeProvider>
      </PersistGate>
    </ReduxProvider>
  </Provider>