Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

649
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!