Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

652
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda