Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

651
Vistas
Uncaught TypeError: (0 , _createStore.default) is not a function

I am switching my redux-react app to gatsby app , I am facing this issue enter image description here

and I cannot see the pages anymore. I've tried to follow these instructions : https://github.com/gatsbyjs/gatsby/tree/master/examples/using-redux yet I get this problem. createStore.js :

import { createStore, applyMiddleware } from 'redux'
import logger from 'redux-logger'
import createSagaMiddle from 'redux-saga'
import rootSaga from './rootSaga'
import rootReducer from './rootReducer'
import thunk from 'redux-thunk';
const sagaMiddleware = createSagaMiddle()
export const middlewares = [thunk,sagaMiddleware,logger];
export const store = createStore(rootReducer, applyMiddleware(...middlewares))
sagaMiddleware.run(rootSaga)
export default store;

rootReducer.js:

import { combineReducers } from 'redux'
import userReducer from './User/user.reducer'
export default combineReducers({
    user: userReducer
})

wrap-with-provider.js:

import * as React from 'react';
import   { Provider } from 'react-redux';
import  store from './src/state/createStore'
const wrapWithProvider = ({ element }) => (
  <Provider store={store}>{element}</Provider>
);
export default wrapWithProvider

and gatsby-ssr.js / gatsby-browser.js:

import wrapWithProvider from "./wrap-with-provider"
export const wrapRootElement = wrapWithProvider

what probably could be the reason.

about 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda